How do you pass a variable between two different matlab apps

So I have been looking at how to pass variables between two apps and nothing has worked.
I have two apps. In app 1 the code is
function RunApp2ButtonPushed(app, event)
app.data = allthedata;
run('App2.mlapp')
end
I can't use the matlab editor because it keeps breaking. :)
Then the code for app2 is
function startupFcn(app)
data = app.data
end
The error I get is "Unrecognized method, property, or field 'data' for class 'App2'.
How do I fix this? Thanks for your help

回答 (1 件)

Steven Lord
Steven Lord 2021 年 1 月 13 日

0 投票

Have you tried following the procedure shown on this documentation page?

カテゴリ

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

製品

リリース

R2019b

質問済み:

2021 年 1 月 13 日

回答済み:

2021 年 1 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by