Cell array without empty variables
Mostrar comentarios más antiguos
I need to create a new cell array using values from another, but excluding the empty values for example... [] 2 [] 1 I would like to have a new a cell array that only includes the 2 and the 1 and skip the empty values. so the final would just read...2 1
Respuesta aceptada
Más respuestas (1)
John D'Errico
el 22 de Abr. de 2016
0 votos
Use cellfun with isempty to identify those cells that are empty. Then just delete those elements like you would delete elements of any other array.
1 comentario
Neal Ousley
el 22 de Abr. de 2016
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!