how can create Changing lamp color with start and stop button
3 次查看(过去 30 天)
显示 更早的评论
0 个评论
采纳的回答
Geoff Hayes
2022-4-21
@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
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!