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 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

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

Más respuestas (1)

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

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by