MATLAB: Deleting rows containing NaN

nan

I have 2 columns and 1000+ rows matrix. I want to delete the rows in which either column 1 or 2 is NaN
thank you

Best Answer

Array(any(isnan(Array),2),:) = [];