Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Stream data form MATLAB to Simulink
Replies: 6   Last Post: Jan 30, 2013 1:51 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Phil Goddard

Posts: 342
Registered: 1/27/12
Re: Stream data form MATLAB to Simulink
Posted: Nov 23, 2012 5:31 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Firstly note that neither MATLAB nor Simulink are real-time applications, so you will never get true real-time using them.

If you want to push data from MATLAB into Simulink you need to use set_param to change the parameter of a block (while the simulation is running).
This will force Simulink to start using the new value.
There a short example of using set_param at,
http://www.goddardconsulting.ca/simulink-creating-using-matlab-code.html

A more typical thing to do would be to write a Simulink block (most likely an m-code S-Function given the info you have given) that check the workspace for new values and uses them.
There are numerous ways of doing that, some much less efficient than others, so you'd need to be careful in choosing the right approach.

Phil.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.