function varargout = updategui(varargin)

%create a run time object that can return the value of the gain block's
%output and then put the value in a string

rto1 = get_param('Beispiel4_sim/SinusOut','RuntimeObject');

% create str from rto1
str = num2str(rto1.InputPort(1).Data);

% get a handle to the GUI's 'current state' window
display = findobj('Tag','edit_display');

% update the gui
set(display,'string',str);



% Save Data to workspace
XData = get_param('Beispiel4_sim','SimulationTime');
YData = rto1.InputPort(1).Data;

assignin('base','XData',XData)
assignin('base','YData',YData)


guiplot=findobj('Tag','axesplot');
plot(XData,YData,guiplot);


