フィルターのクリア

How to turn a matrix into a Multidimensional Array?

5 ビュー (過去 30 日間)
Tristan
Tristan 2013 年 10 月 28 日
編集済み: Andrei Bobrov 2013 年 10 月 28 日
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

採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 10 月 28 日
編集済み: Andrei Bobrov 2013 年 10 月 28 日
permute(A,[3 2 1])
or
reshape(A.',1,size(A,2),[])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by