MATLAB: Interpolation of data 2 vectors

interpolateinterpolation

hi i have trouble interpolate
Y=1945 1946 1947 1948 1949 1950 1951 1952 1953
L=6937 6976 6987 7015 9999 9999 6921 6958 6936
how I can interpolate these values of the year 1949 and 1950? and replace it in the L values. I know is a "for" but i dont know how implement it

Best Answer

Remove the points with bad data . interp1() the points back in
interp1(Y2, L2, [1949 1950])