MATLAB: How to change the x-axis parameters from each iteration to timing

arrayaxisfigureMATLABplot

Hi everyone, i am feeling some problems in changing the axis values from each iteration to time space.
Here is an example for my confusion.
I have a plot with x-axis values [1,2,3,4……200] but the real values that I have to plot in x-axis are [0,0.44,1.08,2.52,3.23,…………102.72]
How can I change the axis values from 1,2,…. 200 to 0, 0.44,1.08……102.72.
Any help and support will be appreciated.

Best Answer

Please post your code. Actually the problem should not even occur at all:
plot(1:200, rand(1, 200));
pause(2);
plot(0:99, rand(1, 100));
As long as the axes' property 'XTickMode' is set to 'auto', the ticks are updated automatically. If you set the XTicks manually, you have to set them manually later on also. Or you set the XTickMode (and XTickLabelMode) to 'auto' again.