フィルターのクリア

Issue with push button userdata

7 ビュー (過去 30 日間)
Jason
Jason 2019 年 9 月 27 日
コメント済み: Himanshu Jain 2021 年 8 月 24 日
Hello.
I am trying to enable a push button to exit a loop if its pressed and decided to user the buttons "UserData".
So I initially set it to 0.
set(handles.btnStop, 'userdata',0)
in my loop, i then check the status of this with an if statement
if get(handles.btnStop, 'userdata') % stop condition
break;
end
In a stop push button I set the user data to 1
set(handles.btnStop, 'userdata',1)
But Im getting a strange result.
when I check what the userdata is berfore I go into the loop (via set(handles.btnStop, 'userdata',0)), I see its a cell array with 2 elements:
ans =
2×1 cell array
{[0]}
{[0]}
  1 件のコメント
Himanshu Jain
Himanshu Jain 2021 年 8 月 24 日
I am not able to reproduce the same issue, I am getting the expected results. Can you please send more info about the issue. Also if possible, please share the code in which this issue is occuring.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by