%% Call Static Method
% Call java.lang.Double static method isNaN to test variable num. Since num contains a number, no message is displayed.

num = 2.2;
if javaMethod('isNaN','java.lang.Double',num)
    disp('This is not a number')
end

% Copyright 2012 The MathWorks, Inc.