Date: Mar 22, 2013 4:45 PM
Author: mado
Subject: Re: running simulink and m file connection

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