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

4 ビュー (過去 30 日間)
Vinay Killamsetty
Vinay Killamsetty 2019 年 8 月 22 日
コメント済み: Vinay Killamsetty 2019 年 8 月 22 日
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 Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by