Path: news.mathworks.com!not-for-mail
From: "Giacomo " <bigbig1982@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Plot workspace data with GUI
Date: Fri, 24 Jul 2009 10:10:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <h4c1ab$4fp$1@fred.mathworks.com>
Reply-To: "Giacomo " <bigbig1982@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248430219 4601 172.30.248.35 (24 Jul 2009 10:10:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 24 Jul 2009 10:10:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1880541
Xref: news.mathworks.com comp.soft-sys.matlab:558065


Hello all,
in my Simulink model I have a "To Workspace" block called "Test_Data" where I store the simulation data to the base workspace. I wish that, once the simulation is finished and the data are registered into the workspace, clicking on a button on my GUI it pop-up the graph of "Test_Data" with time. It seems so easy but its two days I cannot solve it, matlab keeps giving me errors like "Undefined function or variable 'Test_Data'.
The code for the Plot button callback is:

function plot_button_Callback(hObject, eventdata, handles)
axes(handles.axes1)
options = simset('SrcWorkspace','base');
plot(Test_Data, 'DisplayName', 'Test_Data', 'YDataSource', 'Test_Data');

Can someone help me out solving this? Thank you in advance^^

Giacomo