using find-command to find max or min value
Mostra commenti meno recenti
Please I need your help to estimate the value of min or max of abs(Y) and its corresponding (X) for attached curve (X versus X ) using (find)-command. In addition want plot a line of corresponding (X) and (Y).
Thanks in advance for all.
Best Regards;
1 Commento
Moustafa Abedel Fattah
il 26 Giu 2022
Risposta accettata
Più risposte (1)
I prefer using the find function in combination to find max and min locations. The reason being if the max occurs at more than one location, max only gives you the location of the first one. I've asked them for many, many years to return the index(es) of all max in the vactor.
y = [1 3 2 3 0] % Max at index 2 and 4
[maxValue, indexes] = max(y) % Only gives you the one at index 2 not at 4.
1 Commento
Moustafa Abedel Fattah
il 28 Giu 2022
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

