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

% Last Modified by GUIDE v2.5 04-Jun-2016 00:29:36

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @multidistbytt_OpeningFcn, ...
                   'gui_OutputFcn',  @multidistbytt_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 multidistbytt is made visible.
function multidistbytt_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 multidistbytt (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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

%%

% --- Executes on selection change in LMtype.
function LMtype_Callback(hObject, eventdata, handles)
% hObject    handle to LMtype (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 LMtype contents as cell array
%        contents{get(hObject,'Value')} returns selected item from LMtype
LMDistType = get(handles.LMtype, 'Value');

% --- Executes during object creation, after setting all properties.
function LMtype_CreateFcn(hObject, eventdata, handles)
% hObject    handle to LMtype (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 LPtype.
function LPtype_Callback(hObject, eventdata, handles)
% hObject    handle to LPtype (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 LPtype contents as cell array
%        contents{get(hObject,'Value')} returns selected item from LPtype
LPDistType = get(handles.LPtype, 'Value');

% --- Executes during object creation, after setting all properties.
function LPtype_CreateFcn(hObject, eventdata, handles)
% hObject    handle to LPtype (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 HMtype.
function HMtype_Callback(hObject, eventdata, handles)
% hObject    handle to HMtype (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 HMtype contents as cell array
%        contents{get(hObject,'Value')} returns selected item from HMtype
HMDistType = get(handles.HMtype, 'Value');

% --- Executes during object creation, after setting all properties.
function HMtype_CreateFcn(hObject, eventdata, handles)
% hObject    handle to HMtype (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 HPtype.
function HPtype_Callback(hObject, eventdata, handles)
% hObject    handle to HPtype (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 HPtype contents as cell array
%        contents{get(hObject,'Value')} returns selected item from HPtype
HPDistType = get(handles.HPtype, 'Value');

% --- Executes during object creation, after setting all properties.
function HPtype_CreateFcn(hObject, eventdata, handles)
% hObject    handle to HPtype (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 slider movement.
function LPgain_Callback(hObject, eventdata, handles)
% hObject    handle to ga (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
LPgain = get(handles.LPgain, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function LMgain_Callback(hObject, eventdata, handles)
% hObject    handle to LMgain (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
LMgain = get(handles.LMgain, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function HMgain_Callback(hObject, eventdata, handles)
% hObject    handle to HMgain (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
HMgain = get(handles.HMgain, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function HPgain_Callback(hObject, eventdata, handles)
% hObject    handle to HPgain (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
HPgain = get(handles.HPgain, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function LPmix_Callback(hObject, eventdata, handles)
% hObject    handle to LPmix (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
LPmix = get(handles.LPmix, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function LMmix_Callback(hObject, eventdata, handles)
% hObject    handle to LMmix (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
LMmix = get(handles.LMmix, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function HMmix_Callback(hObject, eventdata, handles)
% hObject    handle to HMmix (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
HMmix = get(handles.HMmix, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end


% --- Executes on slider movement.
function HPmix_Callback(hObject, eventdata, handles)
% hObject    handle to HPmix (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,'Value') returns position of slider
%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
HPmix = get(handles.HPmix, 'Value');

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

% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor',[.9 .9 .9]);
end

function x1val_Callback(hObject, eventdata, handles)
% hObject    handle to x1val (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 x1val as text
%        str2double(get(hObject,'String')) returns contents of x1val as a double
x1 = get(handles.x1val, 'Value');

% --- Executes during object creation, after setting all properties.
function x1val_CreateFcn(hObject, eventdata, handles)
% hObject    handle to x1val (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

function x2val_Callback(hObject, eventdata, handles)
% hObject    handle to x2val (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 x2val as text
%        str2double(get(hObject,'String')) returns contents of x2val as a double
x2 = get(handles.x2val, 'Value');

% --- Executes during object creation, after setting all properties.
function x2val_CreateFcn(hObject, eventdata, handles)
% hObject    handle to x2val (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



function x3val_Callback(hObject, eventdata, handles)
% hObject    handle to x3val (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 x3val as text
%        str2double(get(hObject,'String')) returns contents of x3val as a double
x3 = get(handles.x3val, 'Value');

% --- Executes during object creation, after setting all properties.
function x3val_CreateFcn(hObject, eventdata, handles)
% hObject    handle to x3val (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


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


%%% OutputFCN
%varargout{2} = get(handles.LMtype, 'Value');
v1 = get(handles.LPtype, 'Value');
v2 = get(handles.LMtype, 'Value');
v3 = get(handles.HMtype, 'Value');
v4 = get(handles.HPtype, 'Value');
v5 = get(handles.LPgain, 'Value');
v6 = get(handles.LMgain, 'Value');
v7 = get(handles.HMgain, 'Value');
v8 = get(handles.HPgain, 'Value');
v9 = get(handles.LPmix, 'Value');
v10 = get(handles.LMmix, 'Value');
v11 = get(handles.HMmix, 'Value');
v12 = get(handles.HPmix, 'Value');
v13 = get(handles.x1val, 'Value');
v14 = get(handles.x2val, 'Value');
v15 = get(handles.x3val, 'Value');
handles.output = {v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15};
varargout{1} = handles.output;
% The figure can be deleted now
delete(handles.figure1);


% --- Executes when user attempts to close figure1.
function figure1_CloseRequestFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: delete(hObject) closes the figure
if isequal(get(hObject, 'waitstatus'), 'waiting')
    uiresume(hObject);
else
    delete(hObject);
end
