How to simulate a model through App Designer, set parameters and plot outputs in App Designer?

preview_player
Показать описание
This video shows steps to create an App Designer GUI. Further, it shows how we can use the App Designer to set parameters of Simulink model through workspace variable method (using assignin command). It further shows the API to simulate the model for a fixed duration setting the duration using the StopTime argument. And at last it shows the steps to plot the output in the UIAxes using the simout from the sim command.

Complete source code can be found at:

Рекомендации по теме
Комментарии
Автор

great tutorial thank you very much from the bottom of my heart

wisienkowykompot
Автор

Thank you for this tutorial. It was helpful.

TudorMiron
Автор

Very useful introduction! Having achieved part of my work based on your sharing. Thank you

chrisdeprosperts
Автор

Thank you so much. I’m currently building a learning tool for Power electronics course using Matlab app designer 😅. This was quite helpful.

rebaonereba
Автор

Thank you for the enlightening video. It is very useful for creating an integrated Simulation environment with App designer.

sunilgiri
Автор

Thank you so much! Very helpful video.

heyderlargo
Автор

Tank you very much you help me for my internship when I'm blocked since 3 days

nathanseba
Автор

thank you so much ! this is so helpful !

sriravalikamthamraju
Автор

Me sirvió muchísimo su video, graciasss

gabrielmq
Автор

I am trying to get the output of a frequency v/s time graph from simulink to the app UIAxes. It is giving me error of "Dot indexing is not supported for variables of this type." Sir, can you please explain to me what this error is? This is the code I am using. 'graph' is the name for "to workspace" block

simOut = sim('sim_model');

time = simOut.graph.time;
frequency = simOut.graph.data;

plot(app.UIAxes, time, frequency);

atharvabodhe
Автор

Can the app designer be used for real time sensor readings ?

angelleal
Автор

I'd like to ask a question. I created a complex multibody vehicle model in simulink. It outputs lots of data (via to Workspace) and initially I was analyzing results in MatLab. Now I want to build an App to interact with the model - vehicle setup adjustments etc. I read the results from MatLab to app via evalin command (x_parameter=evalin('base', 'Res.Chassis.F_Axle.etc, etc. Res. being simout timeseries with simulation results). All worked fine till I decided that I want to add a simple possibility to run the model from this app. If I initialize/run the model from App than it doesn't write the results to base workspace. If I would run it from Simulink - than it does, from App it doesn't... May be this is the way it should be but than how do I access results considering that it's a large amount of channels?

TudorMiron
Автор

Nice video! However, I wonder if there's a command that actually lets me see the change in the plot instantly as soon as I change the value in the slide bar, so as to make it more real and interactive. Thanks in advance!

raula.
Автор

Can you plzz tell me how can we import data from excell to from_workspace block in simulink model....can we do it using assignin function...plzz reply

ayushvarun
Автор

Hi, I would like to know if its possible to run an App designed in App designer which is running in one session of matlab and simulink model is running in 2nd session of matlab. I want to form a communication link between the two. Could you please help me.

devikamahajan
Автор

Thanks for the video, I would like to know if I would to compile the app to a standalone app for someone else to use, how does the simulation model from Simulink works for them ?

tosddk
Автор

Hello, I am keep getting this error - Unrecognized field name "Time". & Dot indexing is not supported for variables of this type. What is the reason? I am using R2021b.

yasonthayanithi
Автор

will the plot function work for live graphs(i mean the graphs which takes time to get plotted in simulink model)....plzzz reply

ayushvarun
Автор

does set_param function do the same function as assignin function ....if no, can u plz provide the code for the same simulink model using set_param function....plzz reply to this

ayushvarun
Автор

Hi... I want to set a parameter in a A/C source from an entry of an user in AppDesigner, but wen I do it Matlab says " A/C Source don't exist 'Peak amplitude' parameter'", do you know hoe can I call that parameter?

This ir what 'm doing:
, 'Peak amplitude', app.Vs.Value);
(app.Vs.Value is the value from the user un AppDesigner)...

This is the matlab error msg:
Error using (line 60)

AC Voltage Source block (mask) does not have a parameter named 'Peak amplitude'

Do you know the correct name to this parameter? Thanks a lot for the help that you can bring me....

javierhidalgoescalante