Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: running simulink and m file connection
Replies: 1   Last Post: Mar 22, 2013 4:45 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
mado

Posts: 116
Registered: 5/24/12
Re: running simulink and m file connection
Posted: Mar 22, 2013 4:45 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

steps for program
1- open m file and set parameter in simulink
2- run simulink
3- read from simulink and start compiling mfile then send the resulted parameter to update simulink

i used this code
set_param('pid_INC_GA/Discrete PID Controller','P','1','I','.01');
set_param(gcs,'simulationcommand','start');

the main code that will output Kp Ki
set_param('pid_INC_GA/Discrete PID Controller','P','Kp','I','Ki');
set_param(gcs,'simulationcommand','start');

but there is a problem here the simulink model don't start till the code finished and i don't need that



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.