how can create Changing lamp color with start and stop button
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Akzeptierte Antwort
Geoff Hayes
am 21 Apr. 2022
@Amir Azadeh Ranjbar - you would need callback functions for your start and stop buttons. These callbacks would then change the colour of the lamp. Something like the following may work:
% Button pushed function: StartButton
function StartButtonPushed(app, event)
app.Lamp.Color = 'b'; % blue
end
% Button pushed function: StopButton
function StopButtonPushed(app, event)
app.Lamp.Color = 'r'; % red
end
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps 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!