Plot extreme values on a time series
Ältere Kommentare anzeigen
Hi, I have the attached plots. I would like to mark the maximum and minimum value with a marker and show the values on a legend.
Thanks
Akzeptierte Antwort
Weitere Antworten (1)
Lets say you have a timeserie output where in one column you have Time and in the other you have Data:1 then for finding the max you simply can do
maxPoint = max(x)
It looks through the Data column. Now check for the time idex that is the same as for Data column:
timeIndex = find(x.data == maxPoint);
Now check the time:
x.Time(timeIdex);
Then you plot them as previous comment.
Kategorien
Mehr zu Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!