Quick way to change complex number into NaN

40 visualizaciones (últimos 30 días)
Qian
Qian el 13 de Nov. de 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!

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Numeric Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by