MATLAB: If i have this cell matrix how can delete zero cell

cell arraysfunctionmatrix

if i have
z= [10x10 double]
[10x10 double]
[10x10 double]
[10x10 double]
[10x10 double]
[10x10 double]
[10x10 double]
[10x10 double]
[10x10 double]
[]
[10x10 double]
how can i delete the [] cell from z ?

Best Answer

z(cellfun(@isempty,z)) = [];