MATLAB: Looking for a command

How can I get from A=[21 3 NaN NaN] to A=[21 3 0 0] without using a for cycle?

Best Answer

A(isnan(A)) = 0;