Initializing a cell array in matlab ?
Ältere Kommentare anzeigen
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 Kommentare
Azzi Abdelmalek
am 23 Jul. 2015
This is not a structure, it's a cell array.
James Tursa
am 23 Jul. 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?
Akzeptierte Antwort
Weitere Antworten (1)
Muhammad Usman Saleem
am 23 Jul. 2015
use
size(cell array)
1 Kommentar
Hesham Ismail
am 24 Jul. 2015
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!