How do I pass struct between functions in app designer

4 ビュー (過去 30 日間)
William Pang
William Pang 2020 年 11 月 16 日
回答済み: Mario Malic 2020 年 11 月 16 日
I'm trying to pass a structure from one function to another in app designer and I'm not sure what to do.
I tried app.(Variablename) = variable (where the variable is a 1x1 struct) but it pops up an error message saying unrecognized property for class 'orientation'
Thanks!

採用された回答

Mario Malic
Mario Malic 2020 年 11 月 16 日
Hello,
in the properties block, initialise your variable as struct
example = struct();
and refer to it within other functions as
app.example.field1 = 1;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by