Use
answer = mxIsNaN(value);
instead of
answer = mexIsNaN(value);
See Also
mxIsInf
© 1994-2005 The MathWorks, Inc.