MATLAB Answers

looking for a command

1 view (last 30 days)
How can I get from A=[21 3 NaN NaN] to A=[21 3 0 0] without using a for cycle?

  0 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 6 Oct 2013
A(isnan(A)) = 0;

  0 Comments

Sign in to comment.

More Answers (1)

Andrei Bobrov
Andrei Bobrov on 6 Oct 2013
A(A~=A) = 0

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags

No tags entered yet.