How to change an app parameter from .m file function

Hi guys.
I have designed an app in app designer and it calls a .m file that contains a function.
In that function I do some works and at the end I want to change in some parameters. For example I want to disable a button in app. Could any one help me about it?

4 件のコメント

Geoff Hayes
Geoff Hayes 2022 年 4 月 11 日
@SRii - you could have the function return a parameter that indicates that the button should be disabled (doesn't have to explicitly say "disable button" but perhaps a status that your GUI would interpret as a reason to disable the button).
SRii
SRii 2022 年 4 月 12 日
Thanks for your reply.
Actually I am working with serial ports and I wrote a function that is been called when a data is received. so there's no where to check the return value
Walter Roberson
Walter Roberson 2022 年 4 月 12 日
編集済み: Walter Roberson 2022 年 4 月 12 日
https://www.mathworks.com/help/matlab/math/parameterizing-functions.html
pass the app to the function. Use the app to extract the handle of the button. Set the button property to disable.
SRii
SRii 2022 年 4 月 13 日
Thanks a lot
it really helped

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeApp Building についてさらに検索

質問済み:

2022 年 4 月 9 日

コメント済み:

2022 年 4 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by