How can we transpose a row vector into column vector in a cell

4 次查看(过去 30 天)
I want to convert a row vector in my defined cell into coulumn vector
A{1} = [1 2 3 4];
A{2} = [5 6 7 8];
I want to convert them into
A{1}=[1;2;3;4];
A{2}=[5;6;7;8];
Can this be done with a simple function

采纳的回答

madhan ravi
madhan ravi 2019-8-22
cellfun(@(x) x(:),A,'un',0)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by