Initializing a cell array in matlab ?
Afficher commentaires plus anciens
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 commentaires
Azzi Abdelmalek
le 23 Juil 2015
This is not a structure, it's a cell array.
James Tursa
le 23 Juil 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?
Réponse acceptée
Plus de réponses (1)
Muhammad Usman Saleem
le 23 Juil 2015
use
size(cell array)
1 commentaire
Hesham Ismail
le 24 Juil 2015
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!