App Designer interaction with MATLAB/SIMULINK/SIMSCAPE
이전 댓글 표시
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
2024년 10월 21일
hi,do you solve this problem?
답변 (2개)
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
2019년 7월 17일
편집: Prasanna Venkatesh
2019년 7월 17일
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
2019년 7월 22일
Harsha Priya Daggubati
2019년 7월 22일
0 개 추천
You can call your simulink/simscape models programmatically.
Refer to the following links:
카테고리
도움말 센터 및 File Exchange에서 Foundation and Custom Domains에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!