From: "Phil Goddard" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Stream data form MATLAB to Simulink
Date: Fri, 23 Nov 2012 22:31:06 +0000 (UTC)
Organization: Goddard Consulting
Lines: 12
Message-ID: <k8otfa$lsi$>
References: <k8m06c$n2p$>
Reply-To: "Phil Goddard" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1353709866 22418 (23 Nov 2012 22:31:06 GMT)
NNTP-Posting-Date: Fri, 23 Nov 2012 22:31:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 26433
Xref: comp.soft-sys.matlab:783357

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.