how can i rotate an N-dimensional matrix?
9 ビュー (過去 30 日間)
古いコメントを表示
hi all i am having trouble with project and need to figure out how i can rotate an N-dimensional matrix so that i can 'look in from the side'. ie rotate the matrix around a virtical axis. see attached image for discription.
0 件のコメント
採用された回答
Andrei Bobrov
2014 年 10 月 14 日
編集済み: Andrei Bobrov
2014 年 10 月 15 日
A = cat(3,[1 2 3;4 5 6;7 8 9],[10 11 12;13 14 15;16 17 18])
out = permute(A,[3,1,2]);
2 件のコメント
Andrei Bobrov
2014 年 10 月 15 日
Hi John! You wanted following: [3,6,9;12,15,18] and so on, then:
out = flip(permute(A,[3,1,2]),3);
その他の回答 (1 件)
Adam
2014 年 10 月 14 日
doc permute
is the n-dimensional equivalent of translation although I'm not 100% sure what you mean by looking at it from the side as that implies you are visualising the matrix in some way.
参考
カテゴリ
Help Center および File Exchange で 3-D Scene Control についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!