How to access 2 push buttons within a different push button in gui matlab?

7 views (last 30 days)
In my GUI matlab, I have 2 push buttons which plots graph on pushing them. Now I want to access these 2 push buttons using a 3rd push buttons which works something like this: When push button 3 is pressed, It checks which of the first two buttons is pressed, Then if button 1 is pressed, Code of 1 is executed, Else If button 2 is pressed, Code of 2 is executed . Else If none of the button 1 or 2 is pushed, It returns nothing. End
I know it has to do something with Calling the push buttons , but am not able to figure it out. Any help will be appreciated .
  1 Comment
Geoff Hayes
Geoff Hayes on 2 Feb 2015
Faiza - do you perhaps mean that you have two radio buttons that when selected will each plot a different graph, and that you have a push button which determines which radio button has been selected and so will execute the correct branch? Or do you really have three push buttons and that you want the code to "remember" whether it was push button 1 or push button 2 that was last pressed?

Sign in to comment.

Answers (0)

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!