Just getting started with SimEvents (and hence Simulink). For some debugging purposes, how can I display the current simulation time to the regular Matlab workspace from inside an Embedded Matlab function?
Right now I can show the value of some variables during run-time by making "disp" extrinsic. After doing that I can write "disp(variable)" in my Embedded Matlab code and the value of 'variable' will show up in my regular workspace each time the Embedded function is triggered. To make that info really useful I'd like to write out the current simulation time to my Matlab workspace each time the Embedded Code executes. I guess I can use disp, but I don't know what the current simulation time is called programmatically.
Thanks in advance for any help.
dadigu
You can connect the Clock block from the Simulink source library to an input
of the Embedded MATLAB block to input the simulation time. If you name the
port, 't', then the disp command to display time is
disp(t)
HTH,
Mike
"Dadi Gudmundsson" <da...@sensoranalytics.com> wrote in message
news:hnbkse$jd0$1...@fred.mathworks.com...