MATLAB: Lines to curves drawing problem

cuvelinesplot

hello i have a problem with drawing curve on line or by other words
what i have: points on X-axis with their values on Y-axis as show in figure
what i need to do: draw curve between each two points (i don't want to show the figure as lines but as curves)
thank you

Best Answer

I assume you have the variables x and y which are vectors representing the values in the x-component and in the y-component of each point, respectively. Then, try this
% assuming x and y are your variables:
xValues = linspace(min(x),max(x));
yValues = interp1(x,y,xValues,'spline');
plot(x,y,xValues,yValues)
Related Question