Calling a function in App Designer
古いコメントを表示
I have a function (let's call it 'results.m') and I would like to call it in an app I am creating. I want the inputs to be: filename, characteristic, and environment. These three inputs are set by 3 different Edit fields (text) in the app, and then after pressing the run button I would like to call the function with these three inputs, receive x and y data to plot, and then plot it. I am unsure of how to call the function and how to declare these three inputs as properties, and advice or tips?
採用された回答
その他の回答 (1 件)
Walter Roberson
2023 年 4 月 7 日
filename = app.EditField1.Value;
characteristic = app.Editfield2.Value;
environment = app.Editfeild3.Value;
[x, y] = results(filename, characteristic, environment);
plot(app.UIAxes1, x, y);
title(app.UIAxes1, 'My plot');
There is no need to "declare" the inputs.
カテゴリ
ヘルプ センター および File Exchange で Develop Apps Using App Designer についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!