Getting max Y-Value and draw a new line
2 views (last 30 days)
Show older comments
Hi, I have time data of a simulation, that give several Y-Values for one X-Value.
I want to get the max. Y-Value for each X, like the red line: Before:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149365/image.png)
After:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149366/image.png)
Data:
4 Comments
Walter Roberson
on 24 Sep 2015
Only about 0.5 % of your x values are duplicated.
You may need something similar to http://www.mathworks.com/help/signal/ug/envelope-extraction-using-the-analytic-signal.html
Answers (0)
See Also
Categories
Find more on Line Plots 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!