How to convert to nan

조회 수: 7 (최근 30일)
주희 박
주희 박 2022년 5월 19일
댓글: 주희 박 2022년 5월 20일
FF= [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
And if n<10, convert n to nan. This is what i want to know
Actually I have 10614X696 double file, I can't convert it respectively.
And I want to convert it to nan in sepcific range.
Thanks.

채택된 답변

David Hill
David Hill 2022년 5월 19일
FF= [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
FF(FF>5&FF<14)=nan;
  댓글 수: 1
주희 박
주희 박 2022년 5월 20일
Thank you so much!!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Mathieu NOE
Mathieu NOE 2022년 5월 19일
hello
try this
FF= [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
[i,j] = find(FF > 0 & FF < 10);
FF(i,j) = NaN;
  댓글 수: 1
주희 박
주희 박 2022년 5월 20일
Thank you :)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by