How to find the maximum number in each row in a variable.
2 ビュー (過去 30 日間)
古いコメントを表示
Lets say I have the following matrix:
1 2 3 4 5
2 3 3 3 3
2 2 2 2 5
how should I use max to get the larget number per row?
0 件のコメント
採用された回答
Walter Roberson
2013 年 1 月 24 日
max(YourArray, [], 2)
2 件のコメント
Bethelhem Biru
2020 年 12 月 10 日
this will sisplay as a column matrix, if you want it to display as a row matrix, use the ' sign, for transposition. :)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!