display cell array vertically

6 Ansichten (letzte 30 Tage)
shamal
shamal am 21 Dez. 2023
Verschoben: Stephen23 am 24 Jun. 2024
I WANT THIS:
  1 Kommentar
Stephen23
Stephen23 am 24 Jun. 2024
Verschoben: Stephen23 am 24 Jun. 2024
A = {{1,2},{3,4}}
A = 1x2 cell array
{1x2 cell} {1x2 cell}
B = vertcat(A{:})
B = 2x2 cell array
{[1]} {[2]} {[3]} {[4]}

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 21 Dez. 2023
Bearbeitet: Matt J am 21 Dez. 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]}

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by