Using key presses w/ Radio Buttons in GUIDE figures

3 views (last 30 days)
Hello, I have never used the GUIDE before and have been tasked with making a GUI for data parsing. Basically, I need to use figure toolbar/datacursor to progressively move through a large vector of data and put cursors at several (200+) points of interest. I also need to classify these points as signifying one of 4 different things. My idea is to control what each point I drop is classified as by toggling a different radio button on key press with q, w, e, and r. This way, someone using the GUI can use alt, qwer, and mouse clicks to quickly move through and parse the data.
Is this even possible? I've seen information on WindowKeyPressFcn, but have yet to figure out how to incorporate it into my GUI to toggle different radio buttons. Also, would clicking on my axes (object for graph within UI) to set datacursors cause a focus issue with the radio buttons?
Any advice you can offer would be greatly appreciated. In the mean time, I'm still struggling through the basics of the GUIDE...

Accepted Answer

Joe Yeh
Joe Yeh on 5 Oct 2016
Yes, you can certainly achieve this.
First, there is a post on how to use WindowsKeyPressFcn
You can use 'q' 'w' 'e' 'r' keys to move a cursor ( a display object, for example, a scatter plot object ) across the display area. In the callback function for these key press actions, you would save the position of the scatter plot object to the handles structure and update its position. Then in another callback function for a radio button, you can save the position the display object is currently at to another field of the handles structure when the button is pressed.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!