how to i delete the rows in a cell

1 次查看(过去 30 天)
me
me 2015-11-7
回答: Stephen23 2015-11-7
I have a really large 7231x11 cell with some empty rows. Is it possible for me to delete those empty rows.

回答(1 个)

Stephen23
Stephen23 2015-11-7
>> C = {[1,2];[];[3,4]}
C =
[1x2 double]
[]
[1x2 double]
>> C(cellfun('isempty',C),:) = []
C =
[1x2 double]
[1x2 double]

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by