Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to pick max value in different matrix

2 ビュー (過去 30 日間)
Raja Zufar
Raja Zufar 2020 年 7 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello i have 3 simple matrix and i want to pick the max value, heres the example
A= [52]
B= [93]
C= [75]
D=[93] %its picked by the max value
thanks you guys for helping me :)
  1 件のコメント
Bruno Luong
Bruno Luong 2020 年 7 月 19 日
編集済み: Bruno Luong 2020 年 7 月 19 日
What do you expect for D if your three matrices are not (1 x 1) but (2 x 2) ?
A =
5 9
6 6
B =
4 8
7 6
C =
1 1
9 5
D = ?

回答 (2 件)

madhan ravi
madhan ravi 2020 年 7 月 19 日
max([A, B, C])
  1 件のコメント
madhan ravi
madhan ravi 2020 年 7 月 19 日
Instead of creating a three different matrix , having them as one matrix relives a lot of pain ;)

madhan ravi
madhan ravi 2020 年 7 月 19 日
ABC = cat(3,A,B,C);
D = max(ABC)
  1 件のコメント
madhan ravi
madhan ravi 2020 年 7 月 19 日
https://www.mathworks.com/help/matlab/ref/max.html#bupr490 See that example to understand more on how to use it along dimensions.

この質問は閉じられています。

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by