Plot extreme values on a time series
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (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.
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!