I have (double type) matrix where I have NaN values. I want to change all NaN values to 0 value. How Can I do that?

14 vues (au cours des 30 derniers jours)
I have (double type) matrix where I have NaN values. I want to change all NaN values to 0 value. How Can I do that?

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 20 Fév 2013

Plus de réponses (1)

Thorsten
Thorsten le 20 Fév 2013
X(isnan(X)) = 0;

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by