フィルターのクリア

Interpolate columns in matrix that contain NaN values

1 回表示 (過去 30 日間)
demos serghiou
demos serghiou 2022 年 10 月 27 日
回答済み: Voss 2022 年 10 月 27 日
Hi I have this code to interpolate data that is set to NaN. I use the fillmissing function as shown below but it does not do the job very well. Could I replace the fillmissing function with interp function?
idx = abs(R_f) <= 0.8;
mat_up(idx,:) = NaN;
mat_up=fillmissing(mat_up,'linear');
  1 件のコメント
Mathieu NOE
Mathieu NOE 2022 年 10 月 27 日
hello
what do you see as a problem ?
seems to me there is indeed interpolation and NaNs are removed.
load('R_f.mat');
load('mat_up.mat');
idx = abs(R_f) <= 0.8;
mat_up2 = mat_up;
mat_up2(idx,:) = NaN;
mat_up3=fillmissing(mat_up2,'linear');
err = abs(mat_up - mat_up3);
figure(1);imagesc(err);colorbar('vert');
figure(2);imagesc(double(isnan(err)));colorbar('vert');

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

採用された回答

Voss
Voss 2022 年 10 月 27 日

その他の回答 (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