How do you build multiple cell arrays from the columns of an array?

2 ビュー (過去 30 日間)
L'O.G.
L'O.G. 2022 年 5 月 4 日
コメント済み: L'O.G. 2022 年 5 月 4 日
Given an m x N array of type double, how do you separate the columns into cells so that you have N, m x 1 cell arrays?

採用された回答

Stephen23
Stephen23 2022 年 5 月 4 日
M = randi(9,3,5)
M = 3×5
7 8 2 5 8 3 3 2 7 6 4 2 5 4 8
C = num2cell(M,1)
C = 1×5 cell array
{3×1 double} {3×1 double} {3×1 double} {3×1 double} {3×1 double}
  3 件のコメント
Stephen23
Stephen23 2022 年 5 月 4 日
編集済み: Stephen23 2022 年 5 月 4 日
L'O.G.
L'O.G. 2022 年 5 月 4 日
Thanks for the link.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by