フィルターのクリア

Find Maximum one of numerical arguments

1 回表示 (過去 30 日間)
Light
Light 2013 年 5 月 27 日
How can i find max of 30 arguments max(H1,H2.....H30)
But error message occured "Error using max Too many input arguments.MAX with two matrices to compare and a working dimension is not supported"
Is there any other way?

採用された回答

Image Analyst
Image Analyst 2013 年 5 月 27 日
編集済み: Image Analyst 2013 年 5 月 27 日
Put brackets around them to make them a single array, as my answer below shows.
Try this:
[maxValue, indexAtMaxValue] = max([H1, H2, H3, H4, ...ETC...... , H29, H30]);
  7 件のコメント
Image Analyst
Image Analyst 2013 年 5 月 27 日
編集済み: Image Analyst 2013 年 5 月 27 日
Once again: You forgot to give us the values for the H's, so we can't try my answer.
To drive the point home: How on earth am I supposed to know what value H01 takes on? Or what value any of the other variables have? The answer is I don't. Unless you supply them to me. GIVE ME CODE THAT SAYS:
H01 = 0.003342243423; % or whatever.
...
H2022 = 0.233423423423; % or whatever.
and so on, for all the H's.
Light
Light 2013 年 5 月 28 日
So sorry!! My CODE is almost 500 rows and all of it relative and it is changed in next iterations .......
Anyway!!! Thanks for your big help :-))))

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by