How to find the maximum value and its index from matrices?
8 ビュー (過去 30 日間)
古いコメントを表示
I have a multi dimensional matrix
m(:,:,1) = [1 2 3 4; 8 -21 23 2; 3 1 3 7; 42 43 12 4]
m(:,:,2) = [23 34 1 5;2 -6 3 -7; 2 -65 2 2; 5 8 52 -1]
m(:,:,3) = [54 1 6 2; 51 -4 1 6; 5 1 7 1; 65 1 57 65]
max = [54 34 6 5; 51 -4 23 6; 5 1 7 7; 65 43 57 65]
index =[3 2 3 2; 3 3 1 3; 3 1 3 1; 3 1 3 3]
max should have the maximum value out of the given matrices. index should indicate which matrix the max value came from.
thanks for your help in advance :)
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!