Increasing two different counters by clicking on different parts of a figure
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155789/image.png)
Hi guys,
So here is a figure. This shows the Optokinetic Nystagmus of a primate during a fixation task in response to moving gratings. If you look at subplots 3 and 5, you see that for the first 2000ms the OKN displays one polarity, then it changes to the opposite polarity and then after 5000ms it returns to the original polarity.
What I want to do is to be able to define two variables, let's call them nFlashes and nSwitches. If I click on the part of the subplot before 2000ms, I want nFlashes to be incremented by 1. If I click on the part of the subplot after 5000ms, I want nSwitches to be incremented by 1.
I have never worked with GUIs before so I'd be very grateful if someone could help me out here.
Thanks!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!