I'm using R2016b:

An example of matrix:

`A = [... NaN 0.2200 0.2400 NaN 0.1400 0.2000 0.2600 NaN 0.1400 NaN 0.2600 NaN 0.1400 0.2200 0.2400 NaN 0.1400 0.2000 0.2600 NaN 0.1400 0.2000 0.2800 NaN 0.2200 0.6200 NaN NaN]`

I want to exclude only column 4.

I tried ( from Andrei Bobrov on 25 Mar 2013):

`out = A(all(~isnan(A),2),:); % for nan - rows`

out = A(:,all(~isnan(A))); % for nan - columns

but they also remove all rows or columns with a single NaN element.

Thanks in advance.

## Best Answer