Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

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?

Asked by Teemu

Teemu (view profile)

on 20 Feb 2013

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?

0 Comments

Teemu

Teemu (view profile)

Products

No products are associated with this question.

2 Answers

Answer by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 20 Feb 2013
Accepted answer
A(isnan(A))=0

0 Comments

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

Answer by Thorsten

Thorsten (view profile)

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

0 Comments

Thorsten

Thorsten (view profile)

Contact us