I tried 'interp1' with 'linear' and 'pchip' to tried to pull more data values out of the line that matlab connected my data points. Neither of them look correct when i go to plot the new data values on a loglog plot.
The problem is obvious when using the example from the Matlab Help for 'loglog'
x = logspace(-1,2);
y = exp(x);
loglog(x,y,'-s');
Then find the interpolation to get more data points in the middle, the line isn't smooth:
xq = logspace(-1,2,500);
yq = interp1(x,y,xq,'linear'); %OR% yq = interp1(x,y,xq,'pchip');
figure; loglog(xq,yq);
I must be missing something easy. Thanks.
Best Answer