function varargout = nested_functions_im_GUI(varargin)
% NESTED_FUNCTIONS_IM_GUI MATLAB code for nested_functions_im_GUI.fig
%      NESTED_FUNCTIONS_IM_GUI, by itself, creates a new NESTED_FUNCTIONS_IM_GUI or raises the existing
%      singleton*.
%
%      H = NESTED_FUNCTIONS_IM_GUI returns the handle to a new NESTED_FUNCTIONS_IM_GUI or the handle to
%      the existing singleton*.
%
%      NESTED_FUNCTIONS_IM_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in NESTED_FUNCTIONS_IM_GUI.M with the given input arguments.
%
%      NESTED_FUNCTIONS_IM_GUI('Property','Value',...) creates a new NESTED_FUNCTIONS_IM_GUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before nested_functions_im_GUI_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to nested_functions_im_GUI_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 nested_functions_im_GUI

% Last Modified by GUIDE v2.5 01-Jun-2016 08:47:37

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
    'gui_Singleton',  gui_Singleton, ...
    'gui_OpeningFcn', @nested_functions_im_GUI_OpeningFcn, ...
    'gui_OutputFcn',  @nested_functions_im_GUI_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 nested_functions_im_GUI is made visible.
    function nested_functions_im_GUI_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 nested_functions_im_GUI (see VARARGIN)
        
        % Choose default command line output for nested_functions_im_GUI
        handles.output = hObject;
        
        % Update handles structure
        guidata(hObject, handles);
        a=0;
        set(handles.text2,'String',a);  
        % UIWAIT makes nested_functions_im_GUI wait for user response (see UIRESUME)
        % uiwait(handles.figure1);
   end 

% --- Outputs from this function are returned to the command line.
    function varargout = nested_functions_im_GUI_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;
    end

% --- Executes on button press in up.
    function up_Callback(hObject, eventdata, handles)
        % hObject    handle to up (see GCBO)
        % eventdata  reserved - to be defined in a future version of MATLAB
        % handles    structure with handles and user data (see GUIDATA)
        a=a+1;
        set(handles.text2,'String',a);   
    end

% --- Executes on button press in down.
    function down_Callback(hObject, eventdata, handles)
        % hObject    handle to down (see GCBO)
        % eventdata  reserved - to be defined in a future version of MATLAB
        % handles    structure with handles and user data (see GUIDATA)
         a=a-1;
        set(handles.text2,'String',a);  
    end


end