MATLAB: Plots for unevenly distributed data

plottime

Hi,
I have an excel data which I am plotting in matlab as x- quantity= time and y-quantity= output. The y-quantity values are unevenly distributed w.r.t. x, i.e. the step size between x-quantity is not same. We know that matlab interpolates the unknown values between the known points to plot the graph.
How can I get these unknown values from the graph since I want the whole data to be equally distributed with specific step size.

Best Answer

You cannot get them from the plot, although you can calculate them.
To create a regularly-spaced time vector, used the linspace (link) function. To interpolate your y-values, use the interp1 (link) function.