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

% Last Modified by GUIDE v2.5 23-Dec-2008 17:52:49

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Hierarhy_OpeningFcn, ...
                   'gui_OutputFcn',  @Hierarhy_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin & isstr(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 Hierarhy is made visible.
function Hierarhy_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 Hierarhy (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Hierarhy wait for user response (see UIRESUME)
% uiwait(handles.figure1);
global hierarchy_params;
n_hier=length(hierarchy_params);
str=cell(n_hier,1);
for i=1:n_hier
    str(i)={num2str(hierarchy_params(i).dt)};
end
set(handles.listbox1,'String',str);
current=1;
set(handles.listbox1,'Value',current);
set(handles.edit_smin,'String',num2str(hierarchy_params(current).smin));
set(handles.edit_smax,'String',num2str(hierarchy_params(current).smax));
set(handles.edit_s,'String',num2str(hierarchy_params(current).s));

set(handles.edit_rminmin,'String',num2str(hierarchy_params(current).rminmin));
set(handles.edit_rminmax,'String',num2str(hierarchy_params(current).rminmax));
set(handles.edit_rmin,'String',num2str(hierarchy_params(current).rmin));

set(handles.edit_rmaxmin,'String',num2str(hierarchy_params(current).rmaxmin));
set(handles.edit_rmaxmax,'String',num2str(hierarchy_params(current).rmaxmax));
set(handles.edit_rmax,'String',num2str(hierarchy_params(current).rmax));

set(handles.edit_kmin,'String',num2str(hierarchy_params(current).kmin));
set(handles.edit_kmax,'String',num2str(hierarchy_params(current).kmax));
set(handles.edit_k,'String',num2str(hierarchy_params(current).k));

set(handles.checkbox_tests,'Value',hierarchy_params(current).tests);
set(handles.checkbox_testrmin,'Value',hierarchy_params(current).testrmin);
set(handles.checkbox_testrmax,'Value',hierarchy_params(current).testrmax);
set(handles.checkbox_testk,'Value',hierarchy_params(current).testk);
set(handles.checkbox_use,'Value',hierarchy_params(current).use);

set(handles.edit_tbeg,'String',num2str(hierarchy_params(current).tbeg));
set(handles.edit_tend,'String',num2str(hierarchy_params(current).tend));
set(handles.edit_tbeg_sost,'String',num2str(hierarchy_params(current).tbeg_sost));
set(handles.edit_tend_sost,'String',num2str(hierarchy_params(current).tend_sost));


% --- Outputs from this function are returned to the command line.
function varargout = Hierarhy_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 during object creation, after setting all properties.
function listbox1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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


% --- Executes on selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns listbox1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox1
global hierarchy_params;
current=get(handles.listbox1,'Value');
set(handles.edit_smin,'String',num2str(hierarchy_params(current).smin));
set(handles.edit_smax,'String',num2str(hierarchy_params(current).smax));
set(handles.edit_s,'String',num2str(hierarchy_params(current).s));

set(handles.edit_rminmin,'String',num2str(hierarchy_params(current).rminmin));
set(handles.edit_rminmax,'String',num2str(hierarchy_params(current).rminmax));
set(handles.edit_rmin,'String',num2str(hierarchy_params(current).rmin));

set(handles.edit_rmaxmin,'String',num2str(hierarchy_params(current).rmaxmin));
set(handles.edit_rmaxmax,'String',num2str(hierarchy_params(current).rmaxmax));
set(handles.edit_rmax,'String',num2str(hierarchy_params(current).rmax));

set(handles.edit_kmin,'String',num2str(hierarchy_params(current).kmin));
set(handles.edit_kmax,'String',num2str(hierarchy_params(current).kmax));
set(handles.edit_k,'String',num2str(hierarchy_params(current).k));

set(handles.checkbox_tests,'Value',hierarchy_params(current).tests);
set(handles.checkbox_testrmin,'Value',hierarchy_params(current).testrmin);
set(handles.checkbox_testrmax,'Value',hierarchy_params(current).testrmax);
set(handles.checkbox_testk,'Value',hierarchy_params(current).testk);
set(handles.checkbox_use,'Value',hierarchy_params(current).use);

set(handles.edit_tbeg,'String',num2str(hierarchy_params(current).tbeg));
set(handles.edit_tend,'String',num2str(hierarchy_params(current).tend));
set(handles.edit_tbeg_sost,'String',num2str(hierarchy_params(current).tbeg_sost));
set(handles.edit_tend_sost,'String',num2str(hierarchy_params(current).tend_sost));




% --- Executes during object creation, after setting all properties.
function edit_smin_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_smin (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_smin_Callback(hObject, eventdata, handles)
% hObject    handle to edit_smin (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 edit_smin as text
%        str2double(get(hObject,'String')) returns contents of edit_smin as a double


% --- Executes during object creation, after setting all properties.
function edit_smax_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_smax (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_smax_Callback(hObject, eventdata, handles)
% hObject    handle to edit_smax (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 edit_smax as text
%        str2double(get(hObject,'String')) returns contents of edit_smax as a double


% --- Executes during object creation, after setting all properties.
function edit_s_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_s (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_s_Callback(hObject, eventdata, handles)
% hObject    handle to edit_s (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 edit_s as text
%        str2double(get(hObject,'String')) returns contents of edit_s as a double


% --- Executes during object creation, after setting all properties.
function edit_rminmin_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_rminmin (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_rminmin_Callback(hObject, eventdata, handles)
% hObject    handle to edit_rminmin (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 edit_rminmin as text
%        str2double(get(hObject,'String')) returns contents of edit_rminmin as a double


% --- Executes during object creation, after setting all properties.
function edit_rminmax_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_rminmax (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_rminmax_Callback(hObject, eventdata, handles)
% hObject    handle to edit_rminmax (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 edit_rminmax as text
%        str2double(get(hObject,'String')) returns contents of edit_rminmax as a double


% --- Executes during object creation, after setting all properties.
function edit_rmin_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_rmin (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_rmin_Callback(hObject, eventdata, handles)
% hObject    handle to edit_rmin (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 edit_rmin as text
%        str2double(get(hObject,'String')) returns contents of edit_rmin as a double


% --- Executes during object creation, after setting all properties.
function edit_kmin_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_kmin (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_kmin_Callback(hObject, eventdata, handles)
% hObject    handle to edit_kmin (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 edit_kmin as text
%        str2double(get(hObject,'String')) returns contents of edit_kmin as a double


% --- Executes during object creation, after setting all properties.
function edit_kmax_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_kmax (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_kmax_Callback(hObject, eventdata, handles)
% hObject    handle to edit_kmax (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 edit_kmax as text
%        str2double(get(hObject,'String')) returns contents of edit_kmax as a double


% --- Executes during object creation, after setting all properties.
function edit_k_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_k_Callback(hObject, eventdata, handles)
% hObject    handle to edit_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 edit_k as text
%        str2double(get(hObject,'String')) returns contents of edit_k as a double


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global hierarchy_params;
current=get(handles.listbox1,'Value');
hierarchy_params(current).smin=str2num(get(handles.edit_smin,'String'));
hierarchy_params(current).smax=str2num(get(handles.edit_smax,'String'));
hierarchy_params(current).s=str2num(get(handles.edit_s,'String'));

hierarchy_params(current).rminmin=str2num(get(handles.edit_rminmin,'String'));
hierarchy_params(current).rminmax=str2num(get(handles.edit_rminmax,'String'));
hierarchy_params(current).rmin=str2num(get(handles.edit_rmin,'String'));

hierarchy_params(current).rmaxmin=str2num(get(handles.edit_rmaxmin,'String'));
hierarchy_params(current).rmaxmax=str2num(get(handles.edit_rmaxmax,'String'));
hierarchy_params(current).rmax=str2num(get(handles.edit_rmax,'String'));


hierarchy_params(current).kmin=str2num(get(handles.edit_kmin,'String'));
hierarchy_params(current).kmax=str2num(get(handles.edit_kmax,'String'));
hierarchy_params(current).k=str2num(get(handles.edit_k,'String'));

hierarchy_params(current).tests=get(handles.checkbox_tests,'Value');
hierarchy_params(current).testk=get(handles.checkbox_testk,'Value');
hierarchy_params(current).testrmin=get(handles.checkbox_testrmin,'Value');
hierarchy_params(current).testrmax=get(handles.checkbox_testrmax,'Value');
hierarchy_params(current).use=get(handles.checkbox_use,'Value');

hierarchy_params(current).tbeg=str2num(get(handles.edit_tbeg,'String'));
hierarchy_params(current).tend=str2num(get(handles.edit_tend,'String'));
hierarchy_params(current).tbeg_sost=str2num(get(handles.edit_tbeg_sost,'String'));
hierarchy_params(current).tend_sost=str2num(get(handles.edit_tend_sost,'String'));


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

% Hint: get(hObject,'Value') returns toggle state of checkbox_tests


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

% Hint: get(hObject,'Value') returns toggle state of checkbox_testrmin


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

% Hint: get(hObject,'Value') returns toggle state of checkbox_testk


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

% Hint: get(hObject,'Value') returns toggle state of checkbox_use


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


% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
%[filename,pathname]=uiputfile('*.ier');
%fullname=strcat(pathname,filename);
global hierarchy_params; 
uisave;


% --- Executes during object creation, after setting all properties.
function edit_tbeg_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_tbeg (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_tbeg_Callback(hObject, eventdata, handles)
% hObject    handle to edit_tbeg (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 edit_tbeg as text
%        str2double(get(hObject,'String')) returns contents of edit_tbeg as a double


% --- Executes during object creation, after setting all properties.
function edit_tend_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_tend (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_tend_Callback(hObject, eventdata, handles)
% hObject    handle to edit_tend (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 edit_tend as text
%        str2double(get(hObject,'String')) returns contents of edit_tend as a double


% --- Executes during object creation, after setting all properties.
function edit_tbeg_sost_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_tbeg_sost (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_tbeg_sost_Callback(hObject, eventdata, handles)
% hObject    handle to edit_tbeg_sost (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 edit_tbeg_sost as text
%        str2double(get(hObject,'String')) returns contents of edit_tbeg_sost as a double


% --- Executes during object creation, after setting all properties.
function edit_tend_sost_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_tend_sost (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_tend_sost_Callback(hObject, eventdata, handles)
% hObject    handle to edit_tend_sost (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 edit_tend_sost as text
%        str2double(get(hObject,'String')) returns contents of edit_tend_sost as a double


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


% --- Executes during object creation, after setting all properties.
function edit_rmaxmin_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_rmaxmin (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_rmaxmin_Callback(hObject, eventdata, handles)
% hObject    handle to edit_rmaxmin (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 edit_rmaxmin as text
%        str2double(get(hObject,'String')) returns contents of edit_rmaxmin as a double


% --- Executes during object creation, after setting all properties.
function edit_rmaxmax_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_rmaxmax (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_rmaxmax_Callback(hObject, eventdata, handles)
% hObject    handle to edit_rmaxmax (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 edit_rmaxmax as text
%        str2double(get(hObject,'String')) returns contents of edit_rmaxmax as a double


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

% Hint: get(hObject,'Value') returns toggle state of checkbox_testrmax


% --- Executes during object creation, after setting all properties.
function edit_rmax_CreateFcn(hObject, eventdata, handles)
% hObject    handle to edit_rmax (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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end



function edit_rmax_Callback(hObject, eventdata, handles)
% hObject    handle to edit_rmax (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 edit_rmax as text
%        str2double(get(hObject,'String')) returns contents of edit_rmax as a double


