MATLAB Answers

Teemu
0

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
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

Products

No products are associated with this question.

2 Answers

Answer by Azzi Abdelmalek
on 20 Feb 2013
 Accepted answer
A(isnan(A))=0

  0 Comments


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

  0 Comments


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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!