How can I remove empty arrays of cell

please find attached file, how can I remove empty row of cell arrays. Thanks in advance,

2 Comments

"how can I remove empty row of cell arrays"
None of the cells are empty:
>> any(cellfun(@isempty,time))
ans = 0
All of the cells contain a scalar structure (which is inefficient storage: one non-scalar structure would be much better).
I don't understand, what do you mean?
I want just remove '[]' arrays from 'time'

Sign in to comment.

 Accepted Answer

Run this
idx = cellfun(@(x) isempty(x), time);
time(idx) = [];

2 Comments

Thanks, it's what I expected
No need for an anonymous function:
idx = cellfun(@isempty, time);

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!