How to get Pushed Button activity
2 ビュー (過去 30 日間)
古いコメントを表示
Hello People,
i have two buttons: One is called: PressButtontostartForloop
And the other one is called: ActivityButton
if i Press the Button : PressButtontostartForloop the compiler goes right into the function below...
I want to manipulate the function below, by pushing the ActivityButton from the GUI.
I'm new in Matlab App designer and dont know how to handle this problem.
function PressButtontostartForloopValueChanged(app, event)
for Counter=1 : 10000000
if ActivityButton.Value ==1 %<-- This Line
%Do Something
end
end
end
I read something about callback functions. But i dont know how to do it..
Best regards,
MS
0 件のコメント
回答 (1 件)
Sahithi Kanumarlapudi
2020 年 7 月 21 日
Hi,
From your question it looks like you would like to manipulate the callback function of one button based on the other button's activity. You would not need two buttons inorder to perform that. You could have one button in the app and use the callback of this button to manipulate the data.
Below code might serve as an example
ActivityButton = uibutton(fig,'push',...
'ButtonPushedFcn', @(btn,event) ActivityButtonPushed(btn,ax));
Perform all your calculations in the function defnition of ActivityButtonPushed
For more information refer to the following link
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!