Effacer les filtres
Effacer les filtres

Quick way to change complex number into NaN

24 vues (au cours des 30 derniers jours)
Qian
Qian le 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!

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Numeric Types dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by