필터 지우기
필터 지우기

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

조회 수: 48 (최근 30일)
Ayush Varun
Ayush Varun 2023년 6월 29일
댓글: Sandeep Mishra 2023년 7월 4일
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에서 Plot Customization에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by