Excluding NaNs in resize
이전 댓글 표시
Hi
I want to resize 2 arrays, A and B, to make them the same size.
BUT, array B has a lot of NaN value.
So, I only want to resize A to fit the numerical data in B, excluding the NaN values.
% The CODE to resize
C = imresize(A, size(B));
% How can I modify the size(B) part to exclude the NaN during the resize process?
답변 (1개)
KSSV
2020년 4월 22일
0 개 추천
You can fill the NaN's using fillmissing. And then use resize the way you want.
You can use interp2 to get them to the same size.
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!