remove row if all columns are nan matlab code example Example: remove nan matlab % Old B = A(~isnan(A)) % 2018b and above rmmissing(A)