Clear Filters
Clear Filters

display cell array vertically

14 views (last 30 days)
Luca Re
Luca Re on 21 Dec 2023
Moved: Stephen23 on 24 Jun 2024 at 4:29
I WANT THIS:
  1 Comment
Stephen23
Stephen23 on 24 Jun 2024 at 4:23
Moved: Stephen23 on 24 Jun 2024 at 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]}

Sign in to comment.

Accepted Answer

Matt J
Matt J on 21 Dec 2023
Edited: Matt J on 21 Dec 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]}

More Answers (0)

Categories

Find more on Data Types in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!