I have two realizations for (X,Y)
(0, 200)
(23, 700)
I want to find the value of Y at X1=12.5 with matlab with linear interpolation
Would interp1 work? but haven’t figured out how to use the arguments
Thank you
>Solution :
This does the thing:
x = [0,23];
y = [200,700];
xq = 12.5;
yq = interp1(x,y,xq)
%visualization
plot(x,y);hold on;
stem(xq,yq,'r')
