Read voltage function (mega 2560)

I try to read voltage on arduino mega 2560.

I used matlab function "readVoltage(arduino,'A15');".
The function can read the voltage just one point instantaneously.

But, I want to read the voltage on equal interval time by using a function.
The time need to very short and equal interval.
How can I do this?
If I can this, can I know the least equal interval time?
I can't find this on arduino mega 2560 document.


You mean use analogRead() and delayMicroseconds()?

Is there any one function which has two functions?
Can arduino collect the read voltages on specific interval time on its memory(?) and give us the collected information in one time?
I think it is possible on arduino.

No MatLab experience.

But looking at the code you provided, I think that MatLab should call readVoltage numerous times. An analogue read takes approximately 100 microseconds so that will be the maximum achievable rate.