Initializing a cell array in matlab ?
Mostrar comentarios más antiguos
I have a cell array like this
Columns 1 through 7
[0x1 double] [2x1 double] [2x1 double] [0x1 double] [2x1 double] [2x1 double] [2x1 double]
Columns 8 through 12
[2x1 double] [4x1 double] [3x1 double] [3x1 double] [4x1 double]
is there a way to initialize them since i don't know the size of the element (0x1double)? The only thing i know is that i have 12 elements but not the actual inner size.
2 comentarios
Azzi Abdelmalek
el 23 de Jul. de 2015
This is not a structure, it's a cell array.
James Tursa
el 23 de Jul. de 2015
Often you don't need to specify the "inner size" of the cell elements since they will get replaced with something else downstream in your code. The typical practice is to leave them empty. Why do you think you need to initialize them?
Respuesta aceptada
Más respuestas (1)
Muhammad Usman Saleem
el 23 de Jul. de 2015
use
size(cell array)
1 comentario
Hesham Ismail
el 24 de Jul. de 2015
Categorías
Más información sobre Resizing and Reshaping Matrices 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!