Getting max Y-Value and draw a new line

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:
After:
Data:

댓글 수: 4

Walter Roberson
Walter Roberson 2015년 9월 24일
편집: Walter Roberson 2015년 9월 24일
What is the data structure? Is all of the data being plotted at one time based upon a single Y matrix, or is all of the data being plotted at one time based upon a plot() statement that lists a lot of x/y pairs, or is the data being created incrementally through a loop? Are all of the x coordinates exactly the same (guaranteed) for each y, or might there be round-off error that cause them to be slightly different, or are they only "close to" being the same? (e.g. if everything in the same 10000 points out of 8 million is intended to represent the same x for the purpose of finding the maximum then that is very different than the values being absolutely definitely the same.)
Marv
Marv 2015년 9월 24일
It is time data, please see attached !
Walter Roberson
Walter Roberson 2015년 9월 24일
Only about 0.5 % of your x values are duplicated.
Marv
Marv 2015년 9월 24일
Hm this is just a graphical solution. But I need a curve or a line.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2015년 9월 24일

댓글:

2015년 9월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by