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에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!