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!