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?

 Akzeptierte Antwort

madhan ravi
madhan ravi am 12 Jun. 2020
Bearbeitet: madhan ravi am 12 Jun. 2020

0 Stimmen

[Max, Where] = max(a);
b(Where)

1 Kommentar

hj lee
hj lee am 12 Jun. 2020
Thank you so much!
[ , ] is expressing the data sequence?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Gefragt:

am 12 Jun. 2020

Kommentiert:

am 12 Jun. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by