MATLAB: Exclude NaN cells from a cell array

cell arraysMATLABnan

I have a cell array of n number of rows and one column. Each row contains an array.
I want to exclude these NaN cells or copy this cell array in a new one with skipping the NaN cells in the original.

Best Answer

Try this:
fine_xx = {rand(10,1);rand(10,1);[];rand(10,1);[];[];rand(10,1)}
fine_xx = fine_xx(cellfun(@(x)~isempty(x), fine_xx))
That eliminiates the empty [] cells.