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 Ansichten (letzte 30 Tage)
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?

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 20 Feb. 2013
A(isnan(A))=0

Weitere Antworten (1)

Thorsten
Thorsten am 20 Feb. 2013
X(isnan(X)) = 0;

Kategorien

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

Community Treasure Hunt

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

Start Hunting!

Translated by