The project I am going to start involves usage of MATLAB, SIMULINK and SIMSCAPE. At the end, I need to create a standalone app which has simple inputs and 3d plot as output where the prgram is done in those software. How can I incorporote those into app desginer and give a standalone app?

1 件のコメント

Stone
Stone 2024 年 10 月 21 日
hi,do you solve this problem?

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

回答 (2 件)

Harsha Priya Daggubati
Harsha Priya Daggubati 2019 年 7 月 17 日

0 投票

Hi, 
You can write the values which you want to plot in a ‘mat file’ and load the mat file formed in the App Designer Code and proceed further by referring the “UIAxes” to generate a 3D plot on it.
For instance:
Try executing this code by adding “startupFcn” callback in App Designer, which gives a 3D plot on the “UIAxes” added in “UIFigure”.
In MATLAB:
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
save ( 'variables.mat' , 'X' , 'Y' , 'Z');
In App Designer startupFcn callback method:
load variables.mat;
surf(app.UIAxes, X,Y,Z);

3 件のコメント

Prasanna Venkatesh
Prasanna Venkatesh 2019 年 7 月 17 日
編集済み: Prasanna Venkatesh 2019 年 7 月 17 日
@ Harsha Priya Daggubati
Basically my app need to take simple data from user and do complex program in MATLAB/Simulink/Simscape ang give a simple output. So the standalone app which will be used by Non-Matlab user, should run the programs that I have written in MATLAB/Simulink/Simscape. How to bridge all these? or How to transform the codes in those softwares to app deigner code?
Harsha Priya Daggubati
Harsha Priya Daggubati 2019 年 7 月 17 日
I suggest to take your inputs from App designer textfields(assuming your Inputs are simple),add a callback to your MATLAB code which does your required work and then plot your output.
Prasanna Venkatesh
Prasanna Venkatesh 2019 年 7 月 22 日
Yeah. I have done that. But when I make into a standalone app will that MATLAB function (Callback) will be integrated into the the app design code? What about Simulink and Simscape codes?

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

カテゴリ

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

製品

リリース

R2019a

質問済み:

2019 年 7 月 5 日

コメント済み:

2024 年 10 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by