How do you convert the cell within a cell to a vector?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
L'O.G.
am 7 Mai 2023
Beantwortet: Walter Roberson
am 7 Mai 2023
I have a cell of cells. The inner cell is a 1 x 1 and contains a vector. The vector in each inner cell might be of different length. How do I convert this inner cell into an ordinary vector?
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 7 Mai 2023
testcell = {{[1]} {[2 3]} {[4 5 6]}}
output = cellfun(@(C) C{1}, testcell, 'uniform', 0)
testcell{2}
output{2}
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Types finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!