Within a GUI created with App Designer can I call a function associated with one button inside the code for a different button?
1 回表示 (過去 30 日間)
古いコメントを表示
I have the code below associated with the EXIT button of my GUI. Can I call this function inside the code for a different button? If so, how?
% Button pushed function: EXITButton
function EXIT(app, event)
if isfile( '_TEMP_.jpg' )
delete( '_TEMP_.jpg' )
end
if isfile( '_PREV_.jpg' )
delete( '_PREV_.jpg' )
end
if isfile( '_CURR_.jpg' )
delete( '_CURR_.jpg' )
end
close all
app.delete
end
0 件のコメント
採用された回答
Kevin Holly
2022 年 10 月 18 日
編集済み: Kevin Holly
2022 年 10 月 18 日
When you create a new function, you can just call that function.
function differentButton(app, event)
EXIT(app)
end
5 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!