Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Simulink results & GUI
Date: Sun, 2 Mar 2008 12:45:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <fqe7gf$hnq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1204461903 18170 172.30.248.38 (2 Mar 2008 12:45:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 2 Mar 2008 12:45:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1300181
Xref: news.mathworks.com comp.soft-sys.matlab:454836



I'm in the process of connecting a GUI to a Simulink
simulation and I've run into a few difficulties.

1) The simulation should be running according to the state
of a togle button.

For this I'm using "while cmdStart_State == get(hObject,
'Max')" but the problem is the handles don't get updated
(and the results of the simulation don't get entered into
the workspace) until after the function ends.

My idea was to keep starting and pausing the simulation with
the set_param() function but that doesn't work either
because of the handles that don't update during the function
execution.

So is there a way to continously feed the results of the
simulation into the workspace? The idea is to make a live
plot and keep simulating until the button is toggled again.

I appreciate any help and thanks in advance