How to convert matrix to cell array?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have 4*140 double matrix ,and now i want to convert this matrix into 1*35 cell array,in that each cell contains 4*4 double cell
0 Kommentare
Akzeptierte Antwort
Bruno Luong
am 11 Aug. 2019
Bearbeitet: Bruno Luong
am 11 Aug. 2019
c = mat2cell(A,4,4*ones(1,35))
If you want nested cell as well, do that after the above
c = cellfun(@num2cell, c, 'unif', 0)
Be aware, cell is innefficient to work with.
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices 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!