How can I remove empty arrays of cell
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Farshid Daryabor
el 16 de Abr. de 2020
Comentada: Stephen23
el 16 de Abr. de 2020
please find attached file, how can I remove empty row of cell arrays. Thanks in advance,
2 comentarios
Stephen23
el 16 de Abr. de 2020
Editada: Stephen23
el 16 de Abr. de 2020
"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).
Respuesta aceptada
Ameer Hamza
el 16 de Abr. de 2020
Run this
idx = cellfun(@(x) isempty(x), time);
time(idx) = [];
2 comentarios
Stephen23
el 16 de Abr. de 2020
No need for an anonymous function:
idx = cellfun(@isempty, time);
Más respuestas (0)
Ver también
Categorías
Más información sobre Structures en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!