Runing a .m file accordıng to the status of checkbox
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Atas Fet
am 11 Mai 2015
Bearbeitet: Walter Roberson
am 13 Mai 2015
hi all,
i have a litlle problem with checkbox status. For example i have a checkbox and pushbutton at GUİ when status of checkbox is unchecked i want to run A.m file otherwise i want to run B.m file. How can be done with easiest way ?
appriciate to your help
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 11 Mai 2015
function yourcallback(src, event)
state = get(src, 'Value');
if state == 0
run('A.m');
else
run('B.m');
end
end
3 Kommentare
Walter Roberson
am 12 Mai 2015
Change
state = get(src, 'Value')
to refer to the handle for the checkbox instead of src. The method of finding the appropriate handle will depend upon how you constructed your GUI.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu DSP Algorithm Acceleration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!