How to find the corresponding value?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
hj lee
am 12 Jun. 2020
Kommentiert: hj lee
am 12 Jun. 2020
Hello,
a = [ 1 2 3 6 8 4 ]
b = [10 11 12 13 14 15]
maxa= max(a)
bb = 14;
in this case, I want to find bb which correspond to the maximum value of a.
(because 'max(a)' located in the fifth, so I want to indicate the fifth value of the 'b')
how to do it?
0 Kommentare
Akzeptierte Antwort
madhan ravi
am 12 Jun. 2020
Bearbeitet: madhan ravi
am 12 Jun. 2020
[Max, Where] = max(a);
b(Where)
https://www.mathworks.com/learn/tutorials/matlab-onramp.html - worth doing it
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!