Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
having troubling with push button
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am having trouble in the pushbutton. I have 4 pushbutton and every push button has same calculation but different output. So, I want to display the result whenever either one pushbutton is pressed. I am trying to do with if else but it not work.
2 Commenti
Geoff Hayes
il 23 Apr 2015
Mira - each push button should have its own callback to perform the calculation. How are you trying to use the if/else? Please post some of your code so that we can get an idea of what you are attempting to do.
Risposte (1)
Image Analyst
il 23 Apr 2015
What is "the result"? Is it some string (static text label) where you want to display some sentence with numbers in it? Is it a table/grid? Is it an image that you want to display? You can have the callback of each button call a function to display the result if you want:
DisplayResult(handles);
In DisplayResult() you can set the text label, display the image, plot the data, play the sound, or whatever it is you want to do. (It seems like you think we would somehow magically know what your result is, but we don't.)
1 Commento
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!