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

% Last Modified by GUIDE v2.5 08-Oct-2012 00:52:59

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
    'gui_Singleton',  gui_Singleton, ...
    'gui_OpeningFcn', @GUI2_OpeningFcn, ...
    'gui_OutputFcn',  @GUI2_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 GUI2 is made visible.
function GUI2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
handles.redoption = 'Off';
handles.redk = 0;
handles.redsl = 'Short';
handles.redline = line(0,0);

handles.blueoption = 'Off';
handles.bluek = 0;
handles.bluesl = 'Short';
handles.blueline = line(0,0);

handles.greenoption = 'Off';
handles.greenk = 0;
handles.greensl = 'Short';
handles.greenline = line(0,0);

handles.yellowoption = 'Off';
handles.yellowk = 0;
handles.yellowsl = 'Short';
handles.yellowline = line(0,0);

handles.blackline = line(0,0);
% 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 GUI2 (see VARARGIN)
axis([0 100 0 100]);

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

% Update handles structure
guidata(hObject, handles);

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

% --- Outputs from this function are returned to the command line.
function varargout = GUI2_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 selection change in yellow_sl.
function yellow_sl_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.yellowsl = string_list{val};
guidata(hObject, handles)
% hObject    handle to yellow_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns yellow_sl contents as cell array
%        contents{get(hObject,'Value')} returns selected item from yellow_sl


% --- Executes during object creation, after setting all properties.
function yellow_sl_CreateFcn(hObject, eventdata, handles)
% hObject    handle to yellow_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function yellow_k_Callback(hObject, eventdata, handles)
handles.yellowk = str2double(get(hObject,'String'));
guidata(hObject, handles)
% hObject    handle to yellow_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of yellow_k as text
%        str2double(get(hObject,'String')) returns contents of yellow_k as a double


% --- Executes during object creation, after setting all properties.
function yellow_k_CreateFcn(hObject, eventdata, handles)
% hObject    handle to yellow_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in yellow_options.
function yellow_options_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.yellowoption = string_list{val};
guidata(hObject, handles)
% hObject    handle to yellow_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns yellow_options contents as cell array
%        contents{get(hObject,'Value')} returns selected item from yellow_options


% --- Executes during object creation, after setting all properties.
function yellow_options_CreateFcn(hObject, eventdata, handles)
% hObject    handle to yellow_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in green_sl.
function green_sl_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.greensl = string_list{val};
guidata(hObject, handles)
% hObject    handle to green_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns green_sl contents as cell array
%        contents{get(hObject,'Value')} returns selected item from green_sl


% --- Executes during object creation, after setting all properties.
function green_sl_CreateFcn(hObject, eventdata, handles)
% hObject    handle to green_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function green_k_Callback(hObject, eventdata, handles)
handles.greenk = str2double(get(hObject,'String'));
guidata(hObject, handles)
% hObject    handle to green_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of green_k as text
%        str2double(get(hObject,'String')) returns contents of green_k as a double


% --- Executes during object creation, after setting all properties.
function green_k_CreateFcn(hObject, eventdata, handles)
% hObject    handle to green_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in green_options.
function green_options_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.greenoption = string_list{val};
guidata(hObject, handles)
% hObject    handle to green_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns green_options contents as cell array
%        contents{get(hObject,'Value')} returns selected item from green_options


% --- Executes during object creation, after setting all properties.
function green_options_CreateFcn(hObject, eventdata, handles)
% hObject    handle to green_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in blue_sl.
function blue_sl_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.bluesl = string_list{val};
guidata(hObject, handles)
% hObject    handle to blue_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns blue_sl contents as cell array
%        contents{get(hObject,'Value')} returns selected item from blue_sl


% --- Executes during object creation, after setting all properties.
function blue_sl_CreateFcn(hObject, eventdata, handles)
% hObject    handle to blue_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function blue_k_Callback(hObject, eventdata, handles)
handles.bluek = str2double(get(hObject,'String'));
guidata(hObject, handles)

% hObject    handle to blue_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of blue_k as text
%        str2double(get(hObject,'String')) returns contents of blue_k as a double


% --- Executes during object creation, after setting all properties.
function blue_k_CreateFcn(hObject, eventdata, handles)
% hObject    handle to blue_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in blue_options.
function blue_options_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.blueoption = string_list{val};
guidata(hObject, handles)
% hObject    handle to blue_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns blue_options contents as cell array
%        contents{get(hObject,'Value')} returns selected item from blue_options


% --- Executes during object creation, after setting all properties.
function blue_options_CreateFcn(hObject, eventdata, handles)
% hObject    handle to blue_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in red_options.
function red_options_Callback(hObject, eventdata, handles)
% hObject    handle to red_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.redoption = string_list{val};
guidata(hObject, handles)

% Hints: contents = cellstr(get(hObject,'String')) returns red_options contents as cell array
%        contents{get(hObject,'Value')} returns selected item from red_options


% --- Executes during object creation, after setting all properties.
function red_options_CreateFcn(hObject, eventdata, handles)
% hObject    handle to red_options (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in red_sl.
function red_sl_Callback(hObject, eventdata, handles)
% hObject    handle to red_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
val = get(hObject,'Value');
string_list = get(hObject,'String');
handles.redsl = string_list{val};
guidata(hObject, handles)
% The user selected the second item
% etc.
% Hints: contents = cellstr(get(hObject,'String')) returns red_sl contents as cell array
%        contents{get(hObject,'Value')} returns selected item from red_sl


% --- Executes during object creation, after setting all properties.
function red_sl_CreateFcn(hObject, eventdata, handles)
% hObject    handle to red_sl (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function red_k_Callback(hObject, eventdata, handles)
% hObject    handle to red_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
handles.redk = str2double(get(hObject,'String'));
guidata(hObject, handles)


% --- Executes during object creation, after setting all properties.
function red_k_CreateFcn(hObject, eventdata, handles)
% hObject    handle to red_k (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in yellow_plot.
function yellow_plot_Callback(hObject, eventdata, handles)
delete(handles.yellowline);
if strcmp(handles.yellowoption,'Off')
    handles.yellowline = plot(0,0);
    guidata(hObject, handles);
else
    st = 0:0.1:100;
    y = testfunc(handles.yellowoption, handles.yellowsl, handles.yellowk, st);
    if strcmp(handles.yellowoption,'Bond')
        handles.yellowline = plot(st,y,'y.');
        guidata(hObject, handles);
    else
        handles.yellowline = line(st,y,'color','yellow','linewidth',3);
        guidata(hObject, handles);
    end
    hold on
    axis manual;
    axis on;
    axis([0 100 -100 100]);
    %hTitle  = title ('PayOff Graph');
    hXLabel = xlabel('St');
    hYLabel = ylabel('Payoff');
    set( gca, 'FontName', 'Helvetica');
    %set( hTitle                    , ...
    %   'FontSize'   , 12          , ...
    %  'FontWeight' , 'bold'      );
    set(gca, ...
        'Box'         , 'on'     , ...
        'TickDir'     , 'out'     , ...
        'TickLength'  , [.02 .02] , ...
        'XMinorTick'  , 'on'      , ...
        'YMinorTick'  , 'on'      , ...
        'YGrid'       , 'on'      , ...
        'XGrid'       , 'on'      , ...
        'XColor'      , [.3 .3 .3], ...
        'YColor'      , [.3 .3 .3], ...
        'LineWidth'   , 1         );
    
end
% hObject    handle to yellow_plot (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in green_plot.
function green_plot_Callback(hObject, eventdata, handles)
delete(handles.greenline);
if strcmp(handles.greenoption,'Off')
    handles.greenline = plot(0,0);
    guidata(hObject, handles);
else
    st = 0:0.1:100;
    y = testfunc(handles.greenoption, handles.greensl, handles.greenk, st);
    if strcmp(handles.greenoption,'Bond')
        handles.greenline = plot(st,y,'g.');
        guidata(hObject, handles);
    else
        handles.greenline = line(st,y,'color','green','linewidth',3);
        guidata(hObject, handles);
    end
    hold on
    axis manual;
    axis on;
    axis([0 100 -100 100]);
    %hTitle  = title ('PayOff Graph');
    hXLabel = xlabel('St');
    hYLabel = ylabel('Payoff');
    set( gca, 'FontName', 'Helvetica');
    %set( hTitle                    , ...
    %   'FontSize'   , 12          , ...
    %  'FontWeight' , 'bold'      );
    set(gca, ...
        'Box'         , 'on'     , ...
        'TickDir'     , 'out'     , ...
        'TickLength'  , [.02 .02] , ...
        'XMinorTick'  , 'on'      , ...
        'YMinorTick'  , 'on'      , ...
        'YGrid'       , 'on'      , ...
        'XGrid'       , 'on'      , ...
        'XColor'      , [.3 .3 .3], ...
        'YColor'      , [.3 .3 .3], ...
        'LineWidth'   , 1         );
    
end
% hObject    handle to green_plot (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in blue_plot.
function blue_plot_Callback(hObject, eventdata, handles)
delete(handles.blueline);
if strcmp(handles.blueoption,'Off')
    handles.blueline = plot(0,0);
    guidata(hObject, handles);
else
    st = 0:0.1:100;
    y = testfunc(handles.blueoption, handles.bluesl, handles.bluek, st);
    if strcmp(handles.blueoption,'Bond')
        handles.blueline = plot(st,y,'b.');
        guidata(hObject, handles);
    else
        handles.blueline = line(st,y,'color','blue','linewidth',3);
        guidata(hObject, handles);
    end
    hold on
    axis manual;
    axis on;
    axis([0 100 -100 100]);
    %hTitle  = title ('PayOff Graph');
    hXLabel = xlabel('St');
    hYLabel = ylabel('Payoff');
    set( gca, 'FontName', 'Helvetica');
    %set( hTitle                    , ...
    %   'FontSize'   , 12          , ...
    %  'FontWeight' , 'bold'      );
    set(gca, ...
        'Box'         , 'on'     , ...
        'TickDir'     , 'out'     , ...
        'TickLength'  , [.02 .02] , ...
        'XMinorTick'  , 'on'      , ...
        'YMinorTick'  , 'on'      , ...
        'YGrid'       , 'on'      , ...
        'XGrid'       , 'on'      , ...
        'XColor'      , [.3 .3 .3], ...
        'YColor'      , [.3 .3 .3], ...
        'LineWidth'   , 1         );
    
end

% hObject    handle to blue_plot (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in red_plot.
function red_plot_Callback(hObject, eventdata, handles)
delete(handles.redline);
if strcmp(handles.redoption,'Off')
    handles.redline = plot(0,0);
    guidata(hObject, handles);
else
    st = 0:0.1:100;
    y = testfunc(handles.redoption, handles.redsl, handles.redk, st);
    if strcmp(handles.redoption,'Bond')
        handles.redline = plot(st,y,'r.');
        guidata(hObject, handles);
    else
        handles.redline = line(st,y,'color','red','linewidth',3);
        guidata(hObject, handles);
    end
    hold on
    axis manual;
    axis on;
    axis([0 100 -100 100]);
    %hTitle  = title ('PayOff Graph');
    hXLabel = xlabel('St');
    hYLabel = ylabel('Payoff');
    set( gca, 'FontName', 'Helvetica');
    %set( hTitle                    , ...
    %   'FontSize'   , 12          , ...
    %  'FontWeight' , 'bold'      );
    set(gca, ...
        'Box'         , 'on'     , ...
        'TickDir'     , 'out'     , ...
        'TickLength'  , [.02 .02] , ...
        'XMinorTick'  , 'on'      , ...
        'YMinorTick'  , 'on'      , ...
        'YGrid'       , 'on'      , ...
        'XGrid'       , 'on'      , ...
        'XColor'      , [.3 .3 .3], ...
        'YColor'      , [.3 .3 .3], ...
        'LineWidth'   , 1         );
    
end
%GUI2('addition_Callback',hObject,eventdata,guidata(hObject));
% hObject    handle to red_plot (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on selection change in addition.
function addition_Callback(hObject, eventdata, handles)
val = get(hObject,'Value');
string_list = get(hObject,'String');
option = string_list{val};
st = 0:0.1:100;
delete(handles.blackline);
if strcmp(option,'Off')
    handles.blackline = plot(0,0);
    guidata(hObject, handles);
elseif strcmp(option,'Add All')
    if strcmp(handles.redoption,'Off')
        y1 = 0;
    else
        y1 = testfunc(handles.redoption, handles.redsl, handles.redk, st);
    end
    
    if strcmp(handles.greenoption,'Off')
        y2 = 0;
    else
        y2 =testfunc(handles.greenoption, handles.greensl, handles.greenk, st);
    end
    
    if strcmp(handles.blueoption,'Off')
        y3 = 0;
    else
        y3 =testfunc(handles.blueoption, handles.bluesl, handles.bluek, st);
    end
    
    if strcmp(handles.yellowoption,'Off')
        y4 = 0;
    else
        y4 = testfunc(handles.yellowoption, handles.yellowsl, handles.yellowk, st);
    end
    
    y = y1+y2+y3+y4;
    
    handles.blackline = line(st,y,'color','black','linewidth',3);
    guidata(hObject, handles);
    
    hold on
    axis manual;
    axis on;
    axis([0 100 -100 100]);
    %hTitle  = title ('PayOff Graph');
    hXLabel = xlabel('St');
    hYLabel = ylabel('Payoff');
    set( gca, 'FontName', 'Helvetica');
    %set( hTitle                    , ...
    %   'FontSize'   , 12          , ...
    %  'FontWeight' , 'bold'      );
    set(gca, ...
        'Box'         , 'on'     , ...
        'TickDir'     , 'out'     , ...
        'TickLength'  , [.02 .02] , ...
        'XMinorTick'  , 'on'      , ...
        'YMinorTick'  , 'on'      , ...
        'YGrid'       , 'on'      , ...
        'XGrid'       , 'on'      , ...
        'XColor'      , [.3 .3 .3], ...
        'YColor'      , [.3 .3 .3], ...
        'LineWidth'   , 1         );
    
    
    
end
%guidata(hObject, handles)

% hObject    handle to addition (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns addition contents as cell array
%        contents{get(hObject,'Value')} returns selected item from addition


% --- Executes during object creation, after setting all properties.
function addition_CreateFcn(hObject, eventdata, handles)
% hObject    handle to addition (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end
