多次元行列をページ方向にスライスして2次元配列を得る方法
Afficher commentaires plus anciens
多次元行列をページ方向にスライスして2次元配列を得る簡潔な方法はどうやりますか?
たとえば以下のように実行すると、ページ方向のインデックスごとに表示され、行列にはなりません。
A=randi(10,[5 5 5]);
A(1,:,:)
ans =
ans(:,:,1) =
1 9 10 10 2
ans(:,:,2) =
3 9 1 8 6
ans(:,:,3) =
2 5 8 10 3
ans(:,:,4) =
6 8 9 5 3
ans(:,:,5) =
1 3 5 9 7
これを行列として出力したい場合はどのような方法で行うのが一般的でしょうか?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!