It is best to use one of the interpolation functions to do what you want.
Use interp1 here:
x = [10, 5, 2.5, 1.25, 0.625, 0.312, 0.156,0];
y = [41564.9, 21531.9, 15086.9, 9249, 3175.9, 1781.9, 1320.9, 182.9];
y2 = [1308.9, 2514.9, 4797.9];
x2 = interp1(y, x, y2, 'linear');
figure(1)
plot(x, y, '-g')
hold on
plot(x2, y2, 'bp')
hold off
grid
legend('Data', 'Interpolated Points', 'Location', 'NW')
To interpolate ‘x2’ from ‘y2’, reverse the usual (x,y) argument order, and use (y,x) instead, as I did here. The plot shows your original data as a green line, and the interpolated points as blue stars.
Best Answer