interpolating the NaNs in Cell array - 180x1
古いコメントを表示
I have a Cell vector - I have tried everything i am still getting an error, i am using matlab 2018b version, i am looking for the answer how to interpolate the NaNs in my cell array
回答 (2 件)
KSSV
2020 年 8 月 14 日
Let (x,y) be your data where x and y are n*1 arrays each. Say you have NaN's in y and you want to fill them.
idx = isnan(y) ;
y(idx) = interp1(x(~idx),y(~idx),x(idx)) ;
カテゴリ
ヘルプ センター および File Exchange で NaNs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!