Extracting extremum X,Y coordinates from plot

조회 수: 1 (최근 30일)
Ali
Ali 2023년 1월 16일
댓글: Ali 2023년 1월 18일
Hello,
I have a plot (of a cyclic behaviour) which has a lot of extremum points. I want to extract (and transfer to excel) the coordinates of local extremum points in this plot, instead of writing them down one by one.
I appreciate your help.

채택된 답변

dpb
dpb 2023년 1월 16일
이동: dpb 2023년 1월 16일
findpeaks in the Signal Processing TB can be very helpful for such -- remember a minimum is the maximum of a negated signal.
Per usual, if you were to expect any really specific input, attach a sample of the data...and, if you can plot the data, you can operate on the data used to make the plot instead of extracting it back out of the figure.
If you're manually selecting the points w/ ginput or the like; there's sample code to save those in a variable from the callback function; once you have that array, outputting it to a file is trivial.
Again, too little info for specifics...
  댓글 수: 1
Ali
Ali 2023년 1월 18일
Thank you very much for the help.
I would appreciate if you could elaborate, specially about the second part (saving selected data in a variable from a callback function), or maybe provide a link to the sample code you mentioned. I am not very familiar with these functions.
I might have to select the data manually because there are extremum points which I do not want (but they are clearly reconizable from their values).
I realized another way:
Is it possible to extract (or select) data points that have a massive change in the tangent, before and after them?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by