How do I transpose a vector within a cell?
Show older comments
I have a 1x5 cell each containing 4000 points of data. The 4000 points of data fill the columns, Id like to have each 1x4000 turn into a 4000x1. How to do this? Easy question right?
Thanks in advance!
Accepted Answer
More Answers (1)
KSSV
on 20 Sep 2018
A{1} = rand(5,1) ;
A{2} = rand(5,1) ;
A{3} = rand(5,1) ;
A{4} = rand(5,1) ;
B = cellfun(@(x) x',A,'un',0)
Categories
Find more on Creating and Concatenating Matrices 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!