Plot extreme values on a time series
Show older comments
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
Accepted Answer
More Answers (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.
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!