You are on page 1of 23

function varargout = agua(varargin)

% AGUA MATLAB code for agua.fig


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

% Last Modified by GUIDE v2.5 25-Jan-2019 13:15:51

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @agua_OpeningFcn, ...
'gui_OutputFcn', @agua_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 agua is made visible.


function agua_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 agua (see VARARGIN)
% Choose default command line output for agua
handles.output = hObject;

% Update handles structure


guidata(hObject, handles);

% UIWAIT makes agua wait for user response (see UIRESUME)


% uiwait(handles.figure1);

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

function Qw_Callback(hObject, eventdata, handles)


% hObject handle to Qw (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 Qw as text


% str2double(get(hObject,'String')) returns contents of Qw as a
double

% --- Executes during object creation, after setting all properties.


function Qw_CreateFcn(hObject, eventdata, handles)
% hObject handle to Qw (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 Tw_Callback(hObject, eventdata, handles)


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

% --- Executes during object creation, after setting all properties.


function Tw_CreateFcn(hObject, eventdata, handles)
% hObject handle to Tw (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 Ow_Callback(hObject, eventdata, handles)


% hObject handle to Ow (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 Ow as text


% str2double(get(hObject,'String')) returns contents of Ow as a
double

% --- Executes during object creation, after setting all properties.


function Ow_CreateFcn(hObject, eventdata, handles)
% hObject handle to Ow (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 Lw_Callback(hObject, eventdata, handles)


% hObject handle to Lw (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 Lw as text


% str2double(get(hObject,'String')) returns contents of Lw as a
double

% --- Executes during object creation, after setting all properties.


function Lw_CreateFcn(hObject, eventdata, handles)
% hObject handle to Lw (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 Qr_Callback(hObject, eventdata, handles)


% hObject handle to Qr (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 Qr as text


% str2double(get(hObject,'String')) returns contents of Qr as a
double

% --- Executes during object creation, after setting all properties.


function Qr_CreateFcn(hObject, eventdata, handles)
% hObject handle to Qr (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 Tr_Callback(hObject, eventdata, handles)


% hObject handle to Tr (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 Tr as text


% str2double(get(hObject,'String')) returns contents of Tr as a
double
% --- Executes during object creation, after setting all properties.
function Tr_CreateFcn(hObject, eventdata, handles)
% hObject handle to Tr (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 Or_Callback(hObject, eventdata, handles)


% hObject handle to Or (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 Or as text


% str2double(get(hObject,'String')) returns contents of Or as a
double

% --- Executes during object creation, after setting all properties.


function Or_CreateFcn(hObject, eventdata, handles)
% hObject handle to Or (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 Lr_Callback(hObject, eventdata, handles)


% hObject handle to Lr (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 Lr as text


% str2double(get(hObject,'String')) returns contents of Lr as a
double
% --- Executes during object creation, after setting all properties.
function Lr_CreateFcn(hObject, eventdata, handles)
% hObject handle to Lr (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 X_Callback(hObject, eventdata, handles)


% hObject handle to X (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 X as text


% str2double(get(hObject,'String')) returns contents of X as a
double

% --- Executes during object creation, after setting all properties.


function X_CreateFcn(hObject, eventdata, handles)
% hObject handle to X (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 So_Callback(hObject, eventdata, handles)


% hObject handle to So (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 So as text


% str2double(get(hObject,'String')) returns contents of So as a
double

% --- Executes during object creation, after setting all properties.


function So_CreateFcn(hObject, eventdata, handles)
% hObject handle to So (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 B_Callback(hObject, eventdata, handles)


% hObject handle to B (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 B as text


% str2double(get(hObject,'String')) returns contents of B as a
double

% --- Executes during object creation, after setting all properties.


function B_CreateFcn(hObject, eventdata, handles)
% hObject handle to B (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 Kd_Callback(hObject, eventdata, handles)


% hObject handle to Kd (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 Kd as text


% str2double(get(hObject,'String')) returns contents of Kd as a
double

% --- Executes during object creation, after setting all properties.


function Kd_CreateFcn(hObject, eventdata, handles)
% hObject handle to Kd (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 tethad_Callback(hObject, eventdata, handles)


% hObject handle to tethad (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 tethad as text


% str2double(get(hObject,'String')) returns contents of tethad as
a double

% --- Executes during object creation, after setting all properties.


function tethad_CreateFcn(hObject, eventdata, handles)
% hObject handle to tethad (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 tethaa_Callback(hObject, eventdata, handles)


% hObject handle to tethaa (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 tethaa as text


% str2double(get(hObject,'String')) returns contents of tethaa as
a double

% --- Executes during object creation, after setting all properties.


function tethaa_CreateFcn(hObject, eventdata, handles)
% hObject handle to tethaa (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 Vs_Callback(hObject, eventdata, handles)


% hObject handle to Vs (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 Vs as text


% str2double(get(hObject,'String')) returns contents of Vs as a
double

% --- Executes during object creation, after setting all properties.


function Vs_CreateFcn(hObject, eventdata, handles)
% hObject handle to Vs (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 n_Callback(hObject, eventdata, handles)


% hObject handle to n (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 n as text


% str2double(get(hObject,'String')) returns contents of n as a
double

% --- Executes during object creation, after setting all properties.


function n_CreateFcn(hObject, eventdata, handles)
% hObject handle to n (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 textQo_Callback(hObject, eventdata, handles)


% hObject handle to textQo (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 textQo as text


% str2double(get(hObject,'String')) returns contents of textQo as
a double

% --- Executes during object creation, after setting all properties.


function textQo_CreateFcn(hObject, eventdata, handles)
% hObject handle to textQo (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 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)
%Condiciones de descarga
%Qw = 0.463; % m3/s Caudal
%Tw = 28; % oC Temperatura
%Ow = 2; % mg/L Oxigeno disuelto
%Lw = 200; % mg/L DBO
Qw=str2double(get(handles.Qw,'string'));
Tw=str2double(get(handles.Tw,'string'));
Ow=str2double(get(handles.Ow,'string'));
Lw=str2double(get(handles.Lw,'string'));
handles.Qw=Qw;
handles.Tw=Tw;
handles.Ow=Ow;
handles.Lw=Lw;

%Condiciones de rio
%Qr = 5.787; % m3/s Caudal
%Tr = 20; % oC Temperatura
%Or = 7.5; % mg/L Oxigeno disuelto
%Lr = 2; % mg/L DBO
Qr=str2double(get(handles.Qr,'string'));
Tr=str2double(get(handles.Tr,'string'));
Or=str2double(get(handles.Or,'string'));
Lr=str2double(get(handles.Lr,'string'));
handles.Qr=Qr;
handles.Tr=Tr;
handles.Or=Or;
handles.Lr=Lr;
%X = 40; % km
X=str2double(get(handles.X,'string'));
handles.X=X;
%Canal rectangular
%So = 0.00022; % pendiente S0
%B = 10; % anchura B del canal
%n = 0.035; % rugosidad n,
%Kd(20)= 0.5; %1/dia.
%tethad = 1.047;
%tethaa = 1.024;
%Vs=0.2; % m/d (POC)
So=str2double(get(handles.So,'string'));
B=str2double(get(handles.B,'string'));
n=str2double(get(handles.n,'string'));
Kd(20)=str2double(get(handles.Kd,'string'));
tethad=str2double(get(handles.tethad,'string'));
tethaa=str2double(get(handles.tethaa,'string'));
Vs=str2double(get(handles.Vs,'string'));
handles.So=So;
handles.B=B;
handles.n=n;
handles.Kd=Kd(20);
handles.tethad=tethad;
handles.tethaa=tethaa;
handles.Vs=Vs;

Qo = Qr + Qw;% Caudal de mezcla Qo


Lo= (Lr*Qr + Lw*Qw)/Qo;%DBO en la mezcla
Oo= (Or*Qr + Ow*Qw)/Qo;%O
To= (Tr*Qr + Tw*Qw)/Qo;
Temperatura= [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
23 24 25 26 27 28 29 30];
DO= [14.6 14.2 13.9 13.5 13.1 12.8 12.5 12.1 11.8 11.6 11.3 11.0 10.8
10.5 10.3 10.1 9.9 9.7 9.5 9.3 9.1 8.9 8.7 8.6 8.4 8.3 8.1 8.0 7.8 7.7
7.6];
Os=interp1(Temperatura,DO,To,'linear');
Do=Os-Oo;
h=((Qo*n)/(B*(So)^0.5))^(3/5); %calado h,
U=(Qo/(B*h)); %velocidad de movimiento U,
Ka(20)=(3.93*(U^0.5))/(h^(3/2)); %O’Connor-Dobbins
K1=Ka(20)*(tethaa^(To-20));
K2=Kd(20)*(tethad^(To-20));
Ks=Vs/h;
tv=((X*1000)/(U*86400));
Kr=Ks+K2;
L=Lo*exp(-Kr*tv);
Tv=0:0.01:tv;
LL=Lo*exp(-Kr*Tv);
%plot(Tv,LL)
D=Do*exp(-K1*tv)+(((K2*Lo)/(K1-Kr))*(exp(-Kr*tv)-exp(-K1*tv)));
DD=Do*exp(-K1*Tv)+(((K2*Lo)/(K1-Kr))*(exp(-Kr*Tv)-exp(-K1*Tv)));
%plot(Tv,DD)
OD=Os-D;
OODD=Os-DD;
%plot(Tv,OODD)
tc=(1/(K1-Kr))*log((K1/Kr)*(1-((Do*(K1-Kr))/(K2*Lo))));
Dc=(K2/K1)*Lo*exp(-Kr*tc);
Xc=(U*tc*86400)/1000;
Oc=Os-Dc;

set(handles.textQo,'string',Qo);
set(handles.textLo,'string',Lo);
set(handles.textOo,'string',Oo);
set(handles.textTo,'string',To);
set(handles.textOs,'string',Os);
set(handles.texth,'string',h);
set(handles.textU,'string',U);
set(handles.textKa,'string',Ka(20));
set(handles.textK1,'string',K1);
set(handles.textK2,'string',K2);
set(handles.textKs,'string',Ks);
set(handles.textKr,'string',Kr);
set(handles.textOD,'string',OD);
set(handles.textDD,'string',DD);
set(handles.textDo,'string',Do);
set(handles.textDc,'string',Dc);
set(handles.textTc,'string',tc);
set(handles.textL,'string',L);
%axes(handles.axes1)
%hancles.P1=plot(Tv,DD,'-b',Tv,OODD,'-.g','LineWidth',2,'MarkerSize',4);
%legend('Deficit Oxigeno Disuelto (mg/L)','Oxigeno Disuelto (mg/L)');
%xlabel('Tiempo (d)');
%ylabel('[] Oxigeno (mg/L)');
title('Grafico de balance de Oxigeno');
text(tc,Dc,'\leftarrow Dc');
text(tc,Oc,'\leftarrow Oc');
grid on
handles.Tv=Tv;
handles.DD=DD;
handles.OODD=OODD;
handles.LL=LL;
guidata(hObject, handles);

function textLo_Callback(hObject, eventdata, handles)


% hObject handle to textLo (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 textLo as text


% str2double(get(hObject,'String')) returns contents of textLo as
a double
% --- Executes during object creation, after setting all properties.
function textLo_CreateFcn(hObject, eventdata, handles)
% hObject handle to textLo (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 textOo_Callback(hObject, eventdata, handles)


% hObject handle to textOo (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 textOo as text


% str2double(get(hObject,'String')) returns contents of textOo as
a double

% --- Executes during object creation, after setting all properties.


function textOo_CreateFcn(hObject, eventdata, handles)
% hObject handle to textOo (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 textTo_Callback(hObject, eventdata, handles)


% hObject handle to textTo (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 textTo as text


% str2double(get(hObject,'String')) returns contents of textTo as
a double
% --- Executes during object creation, after setting all properties.
function textTo_CreateFcn(hObject, eventdata, handles)
% hObject handle to textTo (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 textOs_Callback(hObject, eventdata, handles)


% hObject handle to textOs (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 textOs as text


% str2double(get(hObject,'String')) returns contents of textOs as
a double

% --- Executes during object creation, after setting all properties.


function textOs_CreateFcn(hObject, eventdata, handles)
% hObject handle to textOs (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 textDo_Callback(hObject, eventdata, handles)


% hObject handle to textDo (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 textDo as text


% str2double(get(hObject,'String')) returns contents of textDo as
a double

% --- Executes during object creation, after setting all properties.


function textDo_CreateFcn(hObject, eventdata, handles)
% hObject handle to textDo (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 texth_Callback(hObject, eventdata, handles)


% hObject handle to texth (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 texth as text


% str2double(get(hObject,'String')) returns contents of texth as a
double

% --- Executes during object creation, after setting all properties.


function texth_CreateFcn(hObject, eventdata, handles)
% hObject handle to texth (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 textU_Callback(hObject, eventdata, handles)


% hObject handle to textU (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 textU as text


% str2double(get(hObject,'String')) returns contents of textU as a
double

% --- Executes during object creation, after setting all properties.


function textU_CreateFcn(hObject, eventdata, handles)
% hObject handle to textU (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 textKa_Callback(hObject, eventdata, handles)


% hObject handle to textKa (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 textKa as text


% str2double(get(hObject,'String')) returns contents of textKa as
a double

% --- Executes during object creation, after setting all properties.


function textKa_CreateFcn(hObject, eventdata, handles)
% hObject handle to textKa (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 textK1_Callback(hObject, eventdata, handles)


% hObject handle to textK1 (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 textK1 as text


% str2double(get(hObject,'String')) returns contents of textK1 as
a double

% --- Executes during object creation, after setting all properties.


function textK1_CreateFcn(hObject, eventdata, handles)
% hObject handle to textK1 (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 textK2_Callback(hObject, eventdata, handles)


% hObject handle to textK2 (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 textK2 as text


% str2double(get(hObject,'String')) returns contents of textK2 as
a double

% --- Executes during object creation, after setting all properties.


function textK2_CreateFcn(hObject, eventdata, handles)
% hObject handle to textK2 (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 textKs_Callback(hObject, eventdata, handles)


% hObject handle to textKs (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 textKs as text


% str2double(get(hObject,'String')) returns contents of textKs as
a double

% --- Executes during object creation, after setting all properties.


function textKs_CreateFcn(hObject, eventdata, handles)
% hObject handle to textKs (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 edit31_Callback(hObject, eventdata, handles)


% hObject handle to edit31 (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 edit31 as text


% str2double(get(hObject,'String')) returns contents of edit31 as
a double

% --- Executes during object creation, after setting all properties.


function edit31_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit31 (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 textOD_Callback(hObject, eventdata, handles)


% hObject handle to textOD (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 textOD as text


% str2double(get(hObject,'String')) returns contents of textOD as
a double

% --- Executes during object creation, after setting all properties.


function textOD_CreateFcn(hObject, eventdata, handles)
% hObject handle to textOD (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 textDc_Callback(hObject, eventdata, handles)


% hObject handle to textDc (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 textDc as text


% str2double(get(hObject,'String')) returns contents of textDc as
a double

% --- Executes during object creation, after setting all properties.


function textDc_CreateFcn(hObject, eventdata, handles)
% hObject handle to textDc (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 textTc_Callback(hObject, eventdata, handles)


% hObject handle to textTc (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 textTc as text


% str2double(get(hObject,'String')) returns contents of textTc as
a double

% --- Executes during object creation, after setting all properties.


function textTc_CreateFcn(hObject, eventdata, handles)
% hObject handle to textTc (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 textL_Callback(hObject, eventdata, handles)


% hObject handle to textL (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 textL as text


% str2double(get(hObject,'String')) returns contents of textL as a
double

% --- Executes during object creation, after setting all properties.


function textL_CreateFcn(hObject, eventdata, handles)
% hObject handle to textL (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 textDD_Callback(hObject, eventdata, handles)


% hObject handle to textDD (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 textDD as text


% str2double(get(hObject,'String')) returns contents of textDD as
a double

% --- Executes during object creation, after setting all properties.


function textDD_CreateFcn(hObject, eventdata, handles)
% hObject handle to textDD (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
guide

% --- Executes on slider movement.


function slider2_Callback(hObject, eventdata, handles)
% hObject handle to slider2 (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

% --- Executes during object creation, after setting all properties.


function slider2_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider2 (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 slider3_Callback(hObject, eventdata, handles)
% hObject handle to slider3 (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

% --- Executes during object creation, after setting all properties.


function slider3_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider3 (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 slider4_Callback(hObject, eventdata, handles)
% hObject handle to slider4 (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

% --- Executes during object creation, after setting all properties.


function slider4_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider4 (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 slider5_Callback(hObject, eventdata, handles)
% hObject handle to slider5 (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

% --- Executes during object creation, after setting all properties.


function slider5_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider5 (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 slider6_Callback(hObject, eventdata, handles)
% hObject handle to slider6 (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

% --- Executes during object creation, after setting all properties.


function slider6_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider6 (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 slider7_Callback(hObject, eventdata, handles)
% hObject handle to slider7 (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

% --- Executes during object creation, after setting all properties.


function slider7_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider7 (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

You might also like