MATLAB: Replace NaN values with numericl values

nan

Hi all,
i have a NaN values in the matrix those i can not importing a numerical values in it the undefined variable error is appear
the question is what should i do to import the numerical matrix into NaN matrix ?
Thanks in advance.

Best Answer

If you want to replace the nan values by 0 for example
A(isnan(A))=0