Replace a scaler with NaN
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a 41x5x2001 matrix (E) with the value -9.96921e+36 scattered throughout. I would like to replace this with NaN. I tried the code below, which has worked for me when replacing zeros with NaN, but it isn't working now. What am I doing wrong?
E(E==-9.96921*10^(36))=nan;
or
E(E==-9.96921e36) = nan
댓글 수: 0
답변 (1개)
Fangjun Jiang
2019년 3월 8일
https://www.mathworks.com/matlabcentral/answers/57444-faq-why-is-0-3-0-2-0-1-not-equal-to-zero
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 NaNs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!