cell array to 2d array
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi just wondering if theres a way to pull out elements of a cell array and putting the elements into rows of a 2D array.
These are the elements:
{[3 1 4 1 5]} {[1 4 1 5 9]} {[4 1 5 9 2]} {[1 5 9 2 6]} {[5 9 2 6 5]}
This is what I want
[3,1,4,1,5;1,4,1,5,9;4,1,5,9,2;1,5,9,2,6;5,9,2,6,5]
0 Commenti
Risposte (1)
Walter Roberson
il 7 Set 2022
Modificato: Walter Roberson
il 7 Set 2022
cell2mat(YourCell(:))
Or in this case
vertcat(YourCell{:})
0 Commenti
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!