simultaneous running of matlab and simulink

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

TAB
TAB on 7 Dec 2012
Edited: TAB on 7 Dec 2012
Few clarifications:
  1. How are you pausing the simulation ?
  2. Simulink save the "To workspace" variable (simout) when simulation is finished. How are you accessing it after pausing the simulation.
  3. "To worspace" block save the simout data to base workspace. How are you accessing it in matlab function ?
  4. Are you reading simout variable in model ?

Sign in to comment.

Answers (1)

The size of your variable simout increase each step, you have just to count the number of step

Categories

Asked:

on 7 Dec 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!