simultaneous running of matlab and simulink
Show older comments
can i send an array from simulink to matlab using 'simout' and get it processed in matlab get the results using 'MATLAB FN' and operate on the results in simulink without switching between both?
this is a sample opeartion i need to do in matlab, m=size(simout);
I am writing this code in a function. Now I am running simulink, pausing switching to matlab, run the program and again if i run the simulink i can get the answer. how to get the answer without switching from simulink, like i want matlab to receive the variable simout and perform operations n retur the result to simulink without explicitely executing the program in matlab
1 Comment
Few clarifications:
- How are you pausing the simulation ?
- Simulink save the "To workspace" variable (simout) when simulation is finished. How are you accessing it after pausing the simulation.
- "To worspace" block save the simout data to base workspace. How are you accessing it in matlab function ?
- Are you reading simout variable in model ?
Answers (1)
Azzi Abdelmalek
on 7 Dec 2012
0 votes
The size of your variable simout increase each step, you have just to count the number of step
Categories
Find more on Event Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!