MATLAB: Function for opposite of isnan

isnan

What I would like is a statement that creates a logical column that is opposite of that which isnan() creates. In other words, instead of nans being indicated by 1, I'd like it to be indicated as a zero… Any ideas for a code or function?

Best Answer

you would go ~isnan() to reverse the 1's to zeros and zeros to be 1.