MATLAB Answers

Increasing two different counters by clicking on different parts of a figure

2 views (last 30 days)
Abhilash
Abhilash on 24 Feb 2016
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 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!