MATLAB: Setting x-axis values

scalingx axis

I have a vector containing 2000 values and when I plot it, the x axis goes from 0 to 2000. I need the x axis to be scaled from 0 to 60, but still show the same graph that it did initially. How do I do this?

Best Answer

x=linspace(0,60,length(y));
plot(x,y)
Related Question