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?

36 views (last 30 days)
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?

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 20 Feb 2013
A(isnan(A))=0

More Answers (1)

Thorsten
Thorsten on 20 Feb 2013
X(isnan(X)) = 0;

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!