Check out example codes for "if is nan matlab". It will help you in understanding the concepts better.

Code Example 1

A(isnan(A))=1;

Code Example 2

if any(isnan(PMatrix), 'all')

Learn ReactJs, React Native from akashmittal.com