function varargout = TESTGUI(varargin)
% TESTGUI M-file for TESTGUI.fig
%      TESTGUI, by itself, creates a new TESTGUI or raises the existing
%      singleton*.
%
%      H = TESTGUI returns the handle to a new TESTGUI or the handle to
%      the existing singleton*.
%
%      TESTGUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in TESTGUI.M with the given input arguments.
%
%      TESTGUI('Property','Value',...) creates a new TESTGUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before TESTGUI_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to TESTGUI_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help TESTGUI

% Last Modified by GUIDE v2.5 04-May-2010 08:29:10

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @TESTGUI_OpeningFcn, ...
                   'gui_OutputFcn',  @TESTGUI_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before TESTGUI is made visible.
function TESTGUI_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to TESTGUI (see VARARGIN)

% Choose default command line output for TESTGUI
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes TESTGUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = TESTGUI_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in plot1_pushbutton.
function plot1_pushbutton_Callback(hObject, eventdata, handles)
% hObject    handle to plot1_pushbutton (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

clear;
setappdata(0,'A',0);        % Setzt A auf 0
setappdata(0,'J',0);        % Setzt J auf 0
setappdata(0,'h',0);        % Setzt h auf 0
setappdata(0,'o',1);        % Setzt o auf 1
setappdata(0,'r',0);        % Setzt r auf 0
setappdata(0,'l',1);        % Setzt l auf 1
setappdata(0,'neu1',0);     % Setzt neu1 auf 0
setappdata(0,'null',0);     % Setzt null auf 0
setappdata(0,'erg',0);      % Setzt erg auf 0
setappdata(0,'oli',0);      % Setzt oli auf 0
setappdata(0,'laut1',1);    % Setzt laut1 auf 1
setappdata(0,'laut2',0);    % Setzt laut2 auf 0
setappdata(0,'laut3',0);    % Setzt laut3 auf 0
setappdata(0,'zeile',1);    % Setzt zeile auf 1
setappdata(0,'ywert',1);    % Setzt ywert auf 1
setappdata(0,'xwert',0);    % Setzt xwert auf 0
setappdata(0,'zwert',0);    % Setzt zwert auf 0
setappdata(0,'t',0);        % Setzt t auf 0
setappdata(0,'tneu',0);     % Setzt tneu auf 0
setappdata(0,'n',0);        % Setzt n auf 0
setappdata(0,'k',0);        % Setzt k auf 0
setappdata(0,'g',0);        % Setzt g auf 0
setappdata(0,'x2',0);       % Setzt x2 auf 0
setappdata(0,'oli1',0);     % Setzt oli1 auf 0
setappdata(0,'oli2',0);     % Setzt oli2 auf 0
setappdata(0,'oli3',0);     % Setzt oli3 auf 0
setappdata(0,'zeilenanzahl',20);    % Setzt zeilenanzahl auf 0


tisch();                    %Löst function tisch() aus
sensor();                   %Löst function sensor() aus











