From: Arvind Kumar on 17 Apr 2010 13:21 Hi, My question about sending a matlab value to workspace and then use it in a simulink model. I ve written a matlab function as an m-file and I run a simulink model inside the function using the 'sim' command. I have to run this function many times through the GA toolbox by varying some parameters in the simulink block for every run. But values from the m-file function dont get passed to simulink because they are not defined in the work space. How can I do this?.... Any help or suggestions are greatly appreciated Thank u.......... Arvind
From: us on 17 Apr 2010 14:00 "Arvind Kumar " <arvindkumarms(a)gmail.com> wrote in message <hqcqm2$6f4$1(a)fred.mathworks.com>... > Hi, > > My question about sending a matlab value to workspace and then use it in a simulink model. I ve written a matlab function as an m-file and I run a simulink model inside the function using the 'sim' command. > I have to run this function many times through the GA toolbox by varying some parameters in the simulink block for every run. But values from the m-file function dont get passed to simulink because they are not defined in the work space. How can I do this?.... > > Any help or suggestions are greatly appreciated > > Thank u.......... > > Arvind a hint: help assignin; us
From: Arvind Kumar on 17 Apr 2010 14:40 Thank u so much...found your hint quite helpful....
From: Arvind Kumar on 17 Apr 2010 14:42 "us " <us(a)neurol.unizh.ch> wrote in message <hqcsvm$b0k$1(a)fred.mathworks.com>... > "Arvind Kumar " <arvindkumarms(a)gmail.com> wrote in message <hqcqm2$6f4$1(a)fred.mathworks.com>... > > Hi, > > > > My question about sending a matlab value to workspace and then use it in a simulink model. I ve written a matlab function as an m-file and I run a simulink model inside the function using the 'sim' command. > > I have to run this function many times through the GA toolbox by varying some parameters in the simulink block for every run. But values from the m-file function dont get passed to simulink because they are not defined in the work space. How can I do this?.... > > > > Any help or suggestions are greatly appreciated > > > > Thank u.......... > > > > Arvind > > a hint: > > help assignin; > > us Thanks....found it quiet useful..... Arvind
From: Steven Lord on 19 Apr 2010 12:52 "Arvind Kumar " <arvindkumarms(a)gmail.com> wrote in message news:hqcqm2$6f4$1(a)fred.mathworks.com... > Hi, > > My question about sending a matlab value to workspace and then use it in a > simulink model. I ve written a matlab function as an m-file and I run a > simulink model inside the function using the 'sim' command. I have to run > this function many times through the GA toolbox by varying some parameters > in the simulink block for every run. But values from the m-file function > dont get passed to simulink because they are not defined in the work > space. How can I do this?.... Set the SrcWorkspace option using SIMSET to tell the Simulink model that you invoke using SIM to look in the current function's workspace. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
Pages: 1 Prev: Image pointer problem Next: working with .txt process content |