Using get() with ui handles?

2 views (last 30 days)
Keith Lewis
Keith Lewis on 10 Feb 2017
Commented: Jan on 12 Feb 2017
I want to do something like this:
function simulationDataMatrix = createSimulationDataMatrix(handles,DataName,noOfSimulations)
if get(handles.radiobutton(DataName)Constant,'Value') == 0
...
...
The script will be for fetching and catching exceptions from user inputted data from the UI.
How can I achieve something like this?
Thanks!

Accepted Answer

Jan
Jan on 11 Feb 2017
It depends on what "DataName" and "Constant" means. If I dare to guess, they might be strings. Then:
if get(handles.(['radiobutton', DataName, 'Constant']), 'Value')
  2 Comments
Keith Lewis
Keith Lewis on 12 Feb 2017
Exactly, thankyou!
Jan
Jan on 12 Feb 2017
You are welcome. This was a good guess :-)

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!