By the definition of NaN, NaN is not equal to anything (including itself.) This is documented on the documentation pages for the NaN function as well as the documentation page for the == operator.
If you can call MATLAB functions in your model, use isequaln to perform equality testing including treating NaN as equal to NaN.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.