The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Stream data form MATLAB to Simulink
Replies: 7   Last Post: Nov 24, 2016 9:20 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: 358
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,

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.


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.