How to pass a table generated from a function back to app-designer?

I have a function like this to generate a data table:
function Function1(app, PATH, FILE);
File_mat = fulfile(PATH, FILE);
load(File_mat);
...
...
...
T1 = table(Var1, Var2, Var3, ...);
end
I plan to call the above function from app-designer by using a command like the below:
Function1(app, app.Path, app.File.Value);
My question is how do I pass the generated table T1 back to app-designer?
Thanks!

 採用された回答

Rik
Rik 2020 年 3 月 11 日
編集済み: Rik 2020 年 3 月 11 日

0 投票

Can't you do something like this?
app.T1=Function1(app, app.Path, app.File.Value);
Of course that would require you to change the function signature to this:
function T1=Function1(app, PATH, FILE);

1 件のコメント

Leon
Leon 2020 年 3 月 11 日
Works flawlessly. Many thanks for your help!

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

その他の回答 (0 件)

カテゴリ

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

製品

リリース

R2019b

質問済み:

2020 年 3 月 11 日

コメント済み:

2020 年 3 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by