필터 지우기
필터 지우기

Quick way to change complex number into NaN

조회 수: 24 (최근 30일)
Qian
Qian 2012년 11월 13일
If I have a matrix of A=[1 2 ; 2+i 3] I want to make it into A=[1 2; NaN 3] Is there anyway like using isnan function to do this? Thanx!

채택된 답변

Teja Muppirala
Teja Muppirala 2012년 11월 13일
A(imag(A)~=0) = nan;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by