フィルターのクリア

interpolation of data 2 vectors

9 ビュー (過去 30 日間)
David Lopez
David Lopez 2012 年 5 月 15 日
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

採用された回答

Walter Roberson
Walter Roberson 2012 年 5 月 15 日
Remove the points with bad data . interp1() the points back in
interp1(Y2, L2, [1949 1950])
  2 件のコメント
David Lopez
David Lopez 2012 年 5 月 15 日
thanks but how is the sintaxis for bad data?
Walter Roberson
Walter Roberson 2012 年 5 月 15 日
is_bad = (L == 9999);
Lfixed = L;
Lfixed(is_bad) = interp1( Y(~is_bad), L(~is_bad), Y(is_bad) );

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by