Info

This question is closed. Reopen it to edit or answer.

how to pick max value in different matrix

2 views (last 30 days)
Raja Zufar
Raja Zufar on 19 Jul 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
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 Comment
Bruno Luong
Bruno Luong on 19 Jul 2020
Edited: Bruno Luong on 19 Jul 2020
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 = ?

Answers (2)

madhan ravi
madhan ravi on 19 Jul 2020
max([A, B, C])
  1 Comment
madhan ravi
madhan ravi on 19 Jul 2020
Instead of creating a three different matrix , having them as one matrix relives a lot of pain ;)

madhan ravi
madhan ravi on 19 Jul 2020
ABC = cat(3,A,B,C);
D = max(ABC)

This question is closed.

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!