Azzera filtri
Azzera filtri

display cell array vertically

14 visualizzazioni (ultimi 30 giorni)
Luca Re
Luca Re il 21 Dic 2023
Spostato: Stephen23 il 24 Giu 2024 alle 4:29
I WANT THIS:
  1 Commento
Stephen23
Stephen23 il 24 Giu 2024 alle 4:23
Spostato: Stephen23 il 24 Giu 2024 alle 4:29
A = {{1,2},{3,4}}
A = 1x2 cell array
{1x2 cell} {1x2 cell}
B = vertcat(A{:})
B = 2x2 cell array
{[1]} {[2]} {[3]} {[4]}

Accedi per commentare.

Risposta accettata

Matt J
Matt J il 21 Dic 2023
Modificato: Matt J il 21 Dic 2023
Perhaps this is what you want,
W1={{1,2},{3,4}}
W1 = 1×2 cell array
{1×2 cell} {1×2 cell}
W2=reshape([W1{:}],2,[])'
W2 = 2×2 cell array
{[1]} {[2]} {[3]} {[4]}

Più risposte (0)

Categorie

Scopri di più su Data Types 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!

Translated by