Filter löschen
Filter löschen

Quick way to change complex number into NaN

24 Ansichten (letzte 30 Tage)
Qian
Qian am 13 Nov. 2012
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!

Akzeptierte Antwort

Teja Muppirala
Teja Muppirala am 13 Nov. 2012
A(imag(A)~=0) = nan;

Weitere Antworten (0)

Kategorien

Mehr zu Numeric Types finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by