How to find the X value that corresponds to the peak Y value from a set of plots?
78 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ismail Qeshta
le 10 Nov 2017
Commenté : Kurnam Gnaneshwar
le 30 Oct 2021
Hi,
I have 100 output curves, and I would like to pick the value of X that corresponds to the maximum Y value. X and Y values are obtained in separate files. I have attached herewith three sets of curves, X1, X2, and X3 for Y1, Y2 and Y3. The Y-axis values is the sum of values from column 2 to 11 in Y files.
I would be grateful if anyone can help me in this regard. Please, let me know if my question is not clear enough.
Thank you very much. Regards, Ismail
0 commentaires
Réponse acceptée
KSSV
le 10 Nov 2017
[maxvaly,idx] = max(y) ;
maxvalx = x(idx) ;
where x and y are you data.
6 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!