How to turn a matrix into a Multidimensional Array?
5 ビュー (過去 30 日間)
古いコメントを表示
for example if I have:
>> A=[2 8; 0 5]
A =
2 8
0 5
and I want to separate each row so that A=
A(:,:,1) =
2 8
A(:,:,2) =
0 5
0 件のコメント
採用された回答
Andrei Bobrov
2013 年 10 月 28 日
編集済み: Andrei Bobrov
2013 年 10 月 28 日
permute(A,[3 2 1])
or
reshape(A.',1,size(A,2),[])
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!