APP Design : variable form callback(1) to be used in callback(2)

Hello Everybody
I am creating an APP in AppDesigner.
There is different callback. the first create a vector A. A is defined in Propertie ; app.A.
Then I would like to use A in an other callback to create A(2,:). But when Callback2 is run, Matlab told me that A doesn't exist...
The solution I have is to save A in callback1 and then load in calback2, but it's really heavy...
Do you have an idea
Regards

 採用された回答

Cris LaPierre
Cris LaPierre 2021 年 8 月 13 日

1 投票

How are you calling A in callback1 and callback2? This should work if
  1. A is defined as an app property
  2. You reference A using app.A in your callbacks (e.g. in callback2, app.A(2,:) = ...)

1 件のコメント

MartinM
MartinM 2021 年 8 月 13 日
Perfect, A need to be app.A,
Thanks!!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品

リリース

R2021a

質問済み:

2021 年 8 月 13 日

コメント済み:

2021 年 8 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by