フィルターのクリア

How to find the maximum number in each row in a variable.

2 ビュー (過去 30 日間)
Lester Lim
Lester Lim 2013 年 1 月 24 日
コメント済み: Bethelhem Biru 2020 年 12 月 10 日
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?

採用された回答

Walter Roberson
Walter Roberson 2013 年 1 月 24 日
max(YourArray, [], 2)
  2 件のコメント
Lester Lim
Lester Lim 2013 年 1 月 24 日
Yup, it works! thanks!
Bethelhem Biru
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 ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by