plotting live simulation graph from the simulink to matlab app designer.

47 次查看(过去 30 天)
I am currently trying to build a gui for one of the simulink model using matlab app designer.It gives the output plot in the scope after around 100sec after the execution of the simulink model.I am not able to plot the live simulation plot on the matlab app designer.I have used sim command to simulate the simulink model and then used the plot command to plot the graph as shown below.
simout=sim('***.slx','StartTime',app.endTimeEditField.Value);
plot(app.UIAxes,simout.vlt.Time,simout.vlt.Data);
here vlt is the workspace used for the scope in the matlab simulink model. here the above two commands gives the output plot for the simulink model which gives the output graph instantaneously but it does not provide the graph for model which takes time to plot on the scope block(live simulation). Can you provide me a solution to this so that i can capture the live simulation result plot on the matlab app designer.I am a beginner and doing my 1st internship so plzz provide me a solution with explanation.Kindly reply to this question.

回答(1 个)

Sandeep Mishra
Sandeep Mishra 2023-6-30
Hi Ayush,
I understand that you are trying to plot Live simulink model in your Matlab App Designer.
You can refer to a similar question that has been answered here :
Feel free to put any comments if you face any issue.
  2 个评论
Ayush Varun
Ayush Varun 2023-6-30
编辑:Ayush Varun 2023-6-30
Thank you so much sir for the reply but the app file given in the attachment cannot open due to some error...
I have attached the simuink model for sine wave ,can u please write the app designer code assuming this is a big model and it takes time plot the curve in the scope block(live plot).I hope you will help me as it is very urgent (there is a workspace block in the simulink)...I want to plot the live graph on the app designer so how should i write the plot command.
kindly help me out
Sandeep Mishra
Sandeep Mishra 2023-7-4
What error are you getting @Ayush Varun?
You can open the TrialApp.mlapp file using MATLAB app designer
You can refer to the below documentation to learn more about "App Designer" in MATLAB.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by