Select specific points in a figure before continuing a for loop
조회 수: 2 (최근 30일)
이전 댓글 표시
Here, I plot complex eigenvalues in the complex plane where the imaginary part is in ordinate and the real part in abscissa. This spectrum will evolve according to the input conditions I ask it. The 2 figures below have been captured at 2 different times. From one moment to the other, the eigenvalues will not be at the same position in my figure.
Rather than looking for a correspondence between each eigenvalue at each time (like the function matchpairs), I would like to work with only a part of its values to reduce the code execution time. For example, with the ones that have the largest imaginary parts (the ones that form a kind of spider's web). The complexity is that I don't know their position in my array, nor the exact number of values I am interested in and the location of the eigenvalues in the vector is not the same from one moment to the next.
So my question is: is it possible to select some eigenvalues on my figure before continuing my loop?
To go further, let's suppose a case (figure below) where my values are in the middle of my spectrum (circled in red), is it still possible to extract exclusively these values before continuing my loop?
I know that my request is complicated but if someone has an idea, I'll take it. Thanks in advance for your help !
댓글 수: 0
채택된 답변
Benjamin Thompson
2022년 3월 2일
There is ginput or rectangle if you are looking to click on the plot and get points or rectangle properties returned to use in selecting a subset of your data.
댓글 수: 3
Benjamin Thompson
2022년 3월 2일
You have not posted any code to help guide the answer here. If your problem is getting fairly complicated you may want to use AppDesigner to build a GUI with a button that lets the user choose when to do this selection. Or if you know the user always wants the do this selection process, there may be no problem waiting in the loop for ginput to return, at least if only one time.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!