MATLAB: How to obtain data from plots

graphplotplotting

I want to get data from the plot(a,b), if i only know three points in 'a' and three points in 'b'
for an example a=[52 104 157] and b=[0.1 0.4 0.4 ] and i want to know the values of remaining points (e.g value of 'b' for 'a'= 60 etc.)
I want to get all the data points in between in a new file.
please help me with any ideas
Regards Agassi

Best Answer

Use the interp1 function to do the interpolation:
a=[52 104 157];
b=[0.1 0.4 0.4 ];
b60 = interp1(a, b, 60)
produces:
b60 =
0.146153846153846