Você está na página 1de 47

UNIVERSIDAD CENTRAL

Proyecto final

Modelamiento y simulacin
Docente:
Jeimy Paola Aristizabal

Autores:
Liesel Estefany Castiblanco
Jordan Zapata

Facultad de ingeniera
Departamento de matemticas
Bogot D.C 25 de noviembre de 2014

ANALISIS DE DATOS

DATOS DEL CLIMA


El National Weather Service recopila cantidades masivas de datos todos los das. Dichos
datos estn disponibles a todas las personas en el servicio en lnea de la agencia en
http://cdo.ncdc.noaa.gov/CDO/cdo.

Figura 1. Emblema

El anlisis de grandes cantidades de datos puede ser


confuso, as que es buena idea comenzar con un pequeo
conjunto de datos, desarrollar un enfoque que funcione y
luego aplicarlo a conjunto de datos ms grandes en los que
se est interesado.
Del National Weather Service se extrajo informacin de
precipitaciones y temperatura del aire para una localidad
para todo 2013 y se almacen en un archivo xls. (Indica
que los datos estn en una hoja de clculo de Excel).

PROBLEMA
Con los datos del archivo.xls, formular un modelo para encontrar la precipitacin diaria
media para cada mes y para el ao. Adems, encontrar la desviacin estndar de los datos
durante cada mes y durante todo el ao.

DEFINICIN DEL PROBLEMA


Los climatlogos examinan datos del clima durante largos periodos de tiempo, con la
intencin de encontrar un patrn. En Estados Unidos, desde 1850, se conservan datos
confiables del clima; la mayora de las estaciones de registro slo se asentaron desde 1930
y 1940.
Los climatlogos realizan clculos estadsticos sobre los datos que recopilan. Aunque los
datos en el archivo.xls representan una sola localidad para un ao, se pueden usar los datos
para representar estos clculos.
Cada fila representa un mes, de modo que hay 12 filas, y cada columna representa el da del
mes (1 a 31), de modo que hay 31 columnas. Dado que no todos los meses tienen el mismo
nmero de das, existen datos perdidos para algunas localidades en muchas de las ltimas
columnas. Se indican que los datos estn perdidos para dichas localidades al colocar en
ellos el nmero 0. La informacin de precipitacin se presenta en centsimas de pulgada.
El problema consiste en encontrar:
o
o
o
o

La precipitacin diaria media para cada mes.


La precipitacin diaria media para el ao.
La desviacin estndar de los datos de precipitacin diaria para cada mes.
La desviacin estndar de los datos de precipitacin diaria para el ao.

El archivo de datos llamado Asheville2013 consiste en una matriz bidimensional. Las


columnas representan un mes y las filas representan un da.
Se decidi presentar la precipitacin en pulgadas con base en los datos extrados del
National Weather Service.

TEORAS QUE GOBIERNAN EL PROBLEMA


Las teoras que se relacionan con el problema y permiten formular el modelo matemtico
son:

Mximos y mnimos: Los mximos y mnimos son los extremos


relativos o locales de una funcin .

Extremos relativos o locales: Si f es derivable en a , a es un


extremo relativo o local si:
1. Si f'(a) = 0.
2. Si f''(a) 0.
Mximos relativos o locales: Si f y f' son derivables en a , a esun mximo
relativo si se cumple:
1. f'(a) = 0
2. f''(a) < 0
Mnimos relativos o locales : Si f y f' son derivables en a , a es un mnimo
relativo si se cumple:
1. f'(a) = 0
2. f''(a) >0

Promedio(media y mediana):

Media aritmtica: La media aritmtica es el valor obtenido al sumar todos


los datos y dividir el resultado entre el nmero total de datos.

Es el smbolo de la media aritmtica.

Mediana
Es el valor que ocupa el lugar central de todos los datos cuando stos estn ordenados de
menor a mayor.
La mediana se representa por
La mediana se puede hallar slo para variables cuantitativas.
Clculo de la mediana:
1 Ordenamos los datos de menor a mayor.
2 Si la serie tiene un nmero impar de medidas la mediana es la puntuacin
central de la misma.
2, 3, 4, 4, 5, 5, 5, 6, 6

=5

3 Si la serie tiene un nmero par de puntuaciones la mediana es la media entre


las dos puntuaciones centrales.
7, 8, 9, 10, 11, 12

= 9.5

Sumas y productos:

La sumatoria o sumatorio se emplea para representar la suma de muchos o


infinitos sumandos.

La expresin se lee: "sumatoria de Xi, donde i toma los valores de 1 a n".


La operacin sumatoria se expresa con la letra griega sigma mayscula
- i es el valor inicial llamado lmite inferior.
- n es el valor final llamado lmite superior.
Si la sumatoria abarca la totalidad de los valores, su expresin se puede simplificar:

Productora: Tambin

conocido

como multiplicatoria o

simplemente producto (por

denotarse como una letra pi mayscula), es un operador matemtico que representa


una multiplicacin de una cantidad arbitraria (finita o infinita).

Para todos los valores m < n, si m = n tenemos que:

En el caso de que m sea mayor que n, m > n, se le asigna el valor del elemento neutro de la
multiplicacin, el uno:

Se puede definir por induccin como sigue.


1. Se define como:

2. Supuesta definida para un n 1 fijo, se define

Ordenamiento:

En estadstica, el estadstico de orden k es igual al valor k-th ms pequeo de


una muestra estadstica. Junto con las estadsticas de rango, los estadsticos de orden son
una de las herramientas ms fundamentales de la estadstica no paramtrica y de inferencia.
Hay casos especiales importantes de los estadsticos de orden son el mnimo y el mximo
valor de una muestra, y (con algunas calificaciones discutidos a continuacin) las muestras
mediana y otros cuantiles de muestra.
Cuando se utiliza la teora de probabilidad para analizar estadsticos de orden de muestras
aleatorias a partir de una distribucin continua, la funcin de distribucin acumulativa se
usa para reducir el anlisis para el caso de estadsticas de orden de la distribucin uniforme.

Desviacin estndar y varianza:

Desviacin estndar: La desviacin estndar o desviacin tpica es la raz


cuadrada de la varianza.
Es decir, la raz cuadrada de la media de los cuadrados de las puntuaciones de
desviacin.
La desviacin estndar se representa por

Distribucin de probabilidad continua


Es posible calcular la desviacin estndar de una variable aleatoria continua como la raz
cuadrada de la integral.

Donde,

Varianza: La varianza (que suele representarse como

) de una variable aleatoria es

una medida de dispersin definida como la esperanza del cuadrado de la desviacin de


dicha variable respecto a su media.
Est medida en unidades distintas de las de la variable. Por ejemplo, si la variable mide una
distancia en metros, la varianza se expresa en metros al cuadrado. La desviacin estndar es
la raz cuadrada de la varianza, es una medida de dispersin alternativa expresada en las
mismas unidades de los datos del variable objeto de estudio. La varianza tiene como valor
mnimo 0.

Siendo:
: Cada dato

n: El nmero de datos.
La media aritmtica de los medios.

FORMULACIN DEL MODELO


Las variables de inters son: Precipitacin media para cada mes y para el ao que se
denominaran MedDayMes y MedDayAnual respectivamente, y la desviacin estndar para
cada mes y para el ao que se denominaran DesStnMes y DesStnAnual
Objetivo a)
La precipitacin diaria media para los primeros 4 das de un mes:
(0 + 0 + 272 + 0) / 4 = 68 centsimas de pulgada de precipitacin, o 0.68 de pulgada.
Objetivo b)
La precipitacin diaria media para el ao se calcul en dos formas equivalentes. Se
encontr la media de cada mes y luego la media (promedio) de los valores mensuales. Esto
resulta ser igual que tomar la media de todos los datos a la vez. Se introdujo la siguiente
sintaxis (MatLab):
wd(:)
El comando convierte la matriz bidimensional en una matriz dimensional. Lo que hace
posible encontrar la media en un paso.

Objetivo c y d)
La desviacin estndar de los datos se encuentra de la siguiente ecuacin:

(x k)

k=1

N1

Ejemplo: Para los primeros 4 das de un mes, se calcula primero la suma de los cuadrados
de la diferencia entre la media y el valor real:
(0 68)2 + (0 - 68)2 + (272 68)2 + (0 68)2 = 55,488
Se divide entre el nmero de puntos de datos menos 1:
55,488/(4 1) = 18,46
Finalmente, sacar la raz cuadrada

18,46=136, o1.36 pulgadasde precipitacin

SOLUCIN MATEMTICA
Los modelos formulados en el punto anterior corresponden a frmulas y no a ecuaciones
por lo que no necesitan ser solucionados.

REPRESENTACIN COMPUTACIONAL
Para representar la informacin solicitada se construy la interface que se ilustra en la
figura 2.
La interface indica adems la precipitacin total para un ao y el mes y el da que hubo
mayor concentracin.

Figura 2. Interface para la simulacin


INTERPRETACIN DE LOS RESULTADOS
Es un modelo explicativo. Se toma una gran cantidad de datos para ser resumidos numrica
o grficamente y que busca explicar las correlaciones y dependencias de un fenmeno
natural.
En este caso en particular se tom como muestra la cantidad de precipitacin en una
localidad durante un ao. Estas dos propiedades tomadas en consideracin (lluvia y
tiempo), determinan en que cantidad se presenta la primera y la frecuencia con que lo hace
en un determinado perodo (das, meses).
Este fenmeno correlacionado puede tener un tercer elemento que no se consider para el
presente modelo y es la temperatura.

COMPARACIN DEL MODELO CON LA VIDA REAL


El presente modelo no arroja predicciones. Los datos obtenidos son parte de las mediciones
hechas directamente en cada estacin (ciudad) de Estados Unidos. El modelo es confiable
por lo que no se requiere reformulacin del mismo.
Los ejemplos que se presentan fueron aplicados en el modelo para cada mes del ao con
base en los datos obtenidos para la ciudad de Ashville en el ao 2013.

Figura 3. Representacin grfica para el mes de Febrero de 2013

Figura 4. Representacin grfica para el mes de Marzo de 2013

LIMITACIONES DEL MODELO


Este modelo se podr aplicar para analizar datos de distintas fuentes. Puesto que lo que se
hace con los mismos es mostrar la relacin que hay entre ellos.

Por razones prcticas, en lugar de compilar datos de una poblacin entera (en este caso 30 o
40 aos) se estudia un subconjunto seleccionado (muestra).
Si la muestra es representativa de la poblacin, inferencias y conclusiones hechas en la
muestra pueden ser extendidas a la poblacin completa. El problema es determinar cun
representativa es la muestra extrada.

REFERENCIAS
http://climatic.educaplus.org/
http://www.multion.com.mx/micrositios/matlab/inicio.html
http://dipuacj.blogspot.com/2009/05/ejemplo-simple-de-una-interfaz-grafica.html
http://yelinna.comoj.com/eam/matlab7.html
http://interfazgraficamatlab.blogspot.com/
http://pdf.directindustry.com/pdf/the-mathworks/matlab-getting-started-guide/1286541215.html
http://www.deingenieria.com/2014/10/matlab-r2010a-en-espanol-32-y-64-bits.html
http://www.pdfoo.org/matlab/240-160929-pdf.html
http://www.sc.ehu.es/sbweb/energias-renovables/MATLAB/datos/olas/ola.html

CDIGO MATLAB

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

% Last Modified by GUIDE v2.5 24-Nov-2014 16:04:42


% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @DiagramClim_OpeningFcn, ...
'gui_OutputFcn', @DiagramClim_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 DiagramClim is made visible.


function DiagramClim_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 DiagramClim (see VARARGIN)
% Choose default command line output for DiagramClim
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes DiagramClim wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = DiagramClim_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 edit1_Callback(hObject, eventdata, handles)

% hObject
% eventdata
% handles

handle to edit1 (see GCBO)


reserved - to be defined in a future version of MATLAB
structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text


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

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


function edit1_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit1 (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 edit2_Callback(hObject, eventdata, handles)


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

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


function edit2_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit2 (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 edit3_Callback(hObject, eventdata, handles)


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


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

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


function edit3_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit3 (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 edit4_Callback(hObject, eventdata, handles)


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

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


function edit4_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit4 (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 edit5_Callback(hObject, eventdata, handles)


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


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

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


function edit5_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit5 (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 edit6_Callback(hObject, eventdata, handles)


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

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


function edit6_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit6 (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 edit7_Callback(hObject, eventdata, handles)


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

%
double

str2double(get(hObject,'String')) returns contents of edit7 as a

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


function edit7_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit7 (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 edit8_Callback(hObject, eventdata, handles)


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

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


function edit8_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit8 (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 edit9_Callback(hObject, eventdata, handles)


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

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


function edit9_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit9 (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 edit10_Callback(hObject, eventdata, handles)


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

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


function edit10_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit10 (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 edit11_Callback(hObject, eventdata, handles)


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

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


function edit11_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit11 (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 edit12_Callback(hObject, eventdata, handles)


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

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


function edit12_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit12 (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 edit13_Callback(hObject, eventdata, handles)


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

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


function edit13_CreateFcn(hObject, eventdata, handles)

% hObject
% eventdata
% handles
called

handle to edit13 (see GCBO)


reserved - to be defined in a future version of MATLAB
empty - handles not created until after all CreateFcns

% 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 edit14_Callback(hObject, eventdata, handles)


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

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


function edit14_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit14 (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 edit15_Callback(hObject, eventdata, handles)


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

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


function edit15_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit15 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB

% handles
called

empty - handles not created until after all CreateFcns

% 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 edit16_Callback(hObject, eventdata, handles)


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

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


function edit16_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit16 (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 edit17_Callback(hObject, eventdata, handles)


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

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


function edit17_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit17 (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 edit18_Callback(hObject, eventdata, handles)


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

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


function edit18_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit18 (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 edit19_Callback(hObject, eventdata, handles)


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

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


function edit19_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit19 (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 edit20_Callback(hObject, eventdata, handles)


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

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


function edit20_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit20 (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 edit21_Callback(hObject, eventdata, handles)


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

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


function edit21_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit21 (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 edit22_Callback(hObject, eventdata, handles)


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

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


function edit22_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit22 (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 edit23_Callback(hObject, eventdata, handles)


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

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


function edit23_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit23 (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'))

end

set(hObject,'BackgroundColor','white');

function edit24_Callback(hObject, eventdata, handles)


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

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


function edit24_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit24 (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 edit25_Callback(hObject, eventdata, handles)


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

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


function edit25_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit25 (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 edit26_Callback(hObject, eventdata, handles)


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

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


function edit26_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit26 (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 edit27_Callback(hObject, eventdata, handles)


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

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


function edit27_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit27 (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 edit28_Callback(hObject, eventdata, handles)


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

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


function edit28_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit28 (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 Abrir.


function Abrir_Callback(hObject, eventdata, handles)
% hObject
handle to Abrir (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% MATRIZ BIDIMENSIONAL
format bank
wd = [0.34 0
0
0.02
0
0.01
0.99
0.02
0.18
0
0
0.02
0
0.01
0
0
0.74
0.17
0.01
0.01
0
0.03
0
0.01
0
0
0.01
0
3.48
0
0.22
0
0
0
0
0
0
0.46
0.41
0
1.48
0
0
0
0
0.01
0
0
0.94
0
2.93
0.4 0.09
0.06
0
0
0
0.27
0
0
0.03
0
0.01
0.03
1.36
0.06
0
0
0
0.35
0
0.44
0
0
0
0.82
0.7 0.45
0
1.27
0.04
0
0
0
0
0
0.06
0.63
0.09
0.02
0
0
0
0.06
0
0
0
0
0
1.59
0.07
0.12
0
0
0
0.18
0
0.28
0
0
0.06
0.58
0.71
0.26
0
0
0
0.31
0.11
0.01
0.72
0.93
0.02
0.02
0.02
0.32
0
0
0
0
0.19
0.23
0.67
0
0
0
0.38
0.2 0
0
0
0.02
0.2 0
0
0
0.1 0
0.02
0.02
0.26
0
0
1.56
0
0
0
0
0
0.87
0
0
0.05
0
0.59
1.06
0
0
0.13
0
0
0.01
0
0
0
0.04
0.07
0.27
0.02
0
0
0
0
0
0
0
0
0.01
0
2.22
0
0
0.32
0
0.23
0.99
0.15
0
0.03
0.26
0
0
0.48
0
1.21
0.08
0
0.24
0.01
0
0.05
0
0
0.01
0
0.62
0.02
0
0.01
0.92
0
0
0
0

0
0

0
0
0.02
0
0
0
0
0
0
0
0
0
0
0.24
0
0
0
0
0.12
0
0.96
0
0.07
0.24
0
0.37
0
0
1.33
0
0.16
0
0.04
0
0
2.39
0
0.22
0.04
0
0
0.03
0
0
0
0.01
0
0.22
0
0
0.76
0.07
0
0
0
0
0
0
0
0
0.01
0
0.01
0
0
0
0
0
0.91
0
0
0
0
1.15
0
0
0.01
0.05
0
0
0
0
2.2 0
0.03
0
0
0.85
0
0.12
0.51
0
0
0
0.14
0
0
0.01
0
1.52
0
0
0
0
0
0.06
0
0.29
0.03
0
0.03
0.21
0
0
0
0.2 0
0
0
0.38
2.44
0
0.31
0
0
0.79
0
0
0
0
0
0
0.05
0
0.33
0
0
0
0.3 0
0
0
0
0];
axes(handles.axes3);
plot(wd);
gridon
xlabel('Tiempo (Meses)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN ANUAL')
axes(handles.axes6);
plot(mean(wd'));
title('GRAFICO DE TIEMPO')
gridon
% PRECIPITACIN TOTAL DEL AO
PrecTotMes = sum(wd);
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
% PRECIPITACIN TOTAL DEL AO Y EL MES
[MaxAnual,Day] = max(max(wd));
set(handles.MaxMes,'String',[MaxAnual,Day])
% PRECIPITACIN TOTAL DEL AO Y EL DA
[MaxAnual,Mes] = max(max(wd'));
set(handles.MaxDia,'String',[MaxAnual,Mes])
%PRECIPITACIN MEDIA MES
MedDayMes = mean(wd);
set(handles.MediaMes,'String',MedDayMes)
% PRECIPITACIN MEDIA DEL AO
MedDayAnual = mean(wd(:));
set(handles.MedAnual,'String',MedDayAnual)
% DESVIACIN ESTANDAR MES
DesStnMes = std(wd);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
bar(DesStnMes,'g');
gridon
% DESVIACIN ESTANDAR AO
DesStnAnual = std(wd(:));
set(handles.EstAnual,'String',DesStnAnual)

function edit29_Callback(hObject, eventdata, handles)


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

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

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


function edit29_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit29 (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.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit30_Callback(hObject, eventdata, handles)


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

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


function edit30_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit30 (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.
ifispc&&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 edit32_Callback(hObject, eventdata, handles)


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

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


function edit32_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit32 (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 edit33_Callback(hObject, eventdata, handles)


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

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


function edit33_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit33 (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.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit34_Callback(hObject, eventdata, handles)


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

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


function edit34_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit34 (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.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit35_Callback(hObject, eventdata, handles)


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

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


function edit35_CreateFcn(hObject, eventdata, handles)

% hObject
% eventdata
% handles
called

handle to edit35 (see GCBO)


reserved - to be defined in a future version of MATLAB
empty - handles not created until after all CreateFcns

% Hint: edit controls usually have a white background on Windows.


%
See ISPC and COMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit36_Callback(hObject, eventdata, handles)


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

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


function edit36_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit36 (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.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit37_Callback(hObject, eventdata, handles)


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

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


function edit37_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit37 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB

% handles
called

empty - handles not created until after all CreateFcns

% Hint: edit controls usually have a white background on Windows.


%
See ISPC and COMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit38_Callback(hObject, eventdata, handles)


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

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


function edit38_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit38 (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.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit39_Callback(hObject, eventdata, handles)


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

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


function edit39_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit39 (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 edit40_Callback(hObject, eventdata, handles)


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

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


function edit40_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit40 (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 edit41_Callback(hObject, eventdata, handles)


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

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


function edit41_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit41 (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.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit42_Callback(hObject, eventdata, handles)


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

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


function edit42_CreateFcn(hObject, eventdata, handles)
% hObject
handle to edit42 (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.
ifispc&&isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on selection change in popupmenu1.


function popupmenu1_Callback(hObject, eventdata, handles)
% hObject
handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
str = get(hObject,'String');
val = get(hObject,'Value');
switchstr{val};
case'Enero'
t=[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,2
7,28,29,30,31];
Mes1=[0.34,0.02,0,0,0,0,0,0,0,0,0.11,0,0.02,1.56,1.06,0.27,2.22,0,0,0,0,0
,0,0,0.01,0,0.03,0,0.03,2.44,0.05];
axes(handles.axes3);
bar(t,Mes1,'r');
grid on
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')

title('PRECIPITACIN ENERO')
% GRFICA AJUSTE LINEAL
axes(handles.axes6);
l=polyfit(t,Mes1,2);
lineal = l(1)*t + l(2);
plot(t,Mes1,'g*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
gridon
% PRECIPITACIN TOTAL DEL MES
PrecTotMes = sum(Mes1);
set(handles.Ene1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
% MES Y PRECIPITACIN MXIMA
[MaxAnual,Day] = max(max(Mes1));
set(handles.MaxMes,'String',[MaxAnual,Day])
% DIA Y PRECIPITACIN MXIMA
[MaxAnual,Mes] = max(Mes1);
set(handles.MaxDia,'String',[MaxAnual,Mes])
% MEDIA DEL MES
MedDayMes = mean(Mes1);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Ene2,'String',MedDayMes)
MedDayAnual = mean(Mes1(:));
set(handles.MedAnual,'String',MedDayAnual)
% DESVIACIN ESTANDAR MES
DesStnMes = std(Mes1);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
gridon
DesStnAnual = std(Mes1(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Febrero'
t=[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,2
7,28,29,30,31];
Mes2=[0,0,0.01,0,0,0,0.44,0,0,0.28,0.01,0.19,0.2,0,0,0.02,0,0,0.01,0,0.24
,0.37,0.22,0,0,1.15,0,0.01,0,0,0];
axes(handles.axes3);
bar(t,Mes2,'g');
gridon
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN FEBRERO')
axes(handles.axes6);
l=polyfit(t,Mes2,2);
lineal = l(1)*t + l(2);
plot(t,Mes2,'b*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
gridon
PrecTotMes = sum(Mes2);
set(handles.Feb1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);

set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes2));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes2);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes2);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Feb2,'String',MedDayMes)
MedDayAnual = mean(Mes2(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes2);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes2(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Marzo'
t=[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,2
7,28,29,30,31];
Mes3=[0,0.01,0,0,0.94,0.03,0,0,0,0,0.72,0.23,0,0,0,0,0,0.48,0,0.02,0,0,0.
04,0.76,0.01,0,0,0,0.03,0.31,0.33];
axes(handles.axes3);
bar(t,Mes3,'c');
gridon
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN MARZO')
axes(handles.axes6);
l=polyfit(t,Mes3,2);
lineal = l(1)*t + l(2);
plot(t,Mes3,'g*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
gridon
PrecTotMes = sum(Mes3);
set(handles.Mar1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes3));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes3);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes3);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Mar2,'String',MedDayMes)
MedDayAnual = mean(Mes3(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes3);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes3(:));

set(handles.EstAnual,'String',DesStnAnual)
case'Abril'
t=[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,2
7,28,29,30,31];
Mes4=[0.02,0,0,0.46,0,0,0,0,0,0,0.93,0.67,0,0,0.13,0,0.32,0,0.62,0,0,0,0,
0.07,0,0,0.85,1.52,0.21,0,0];
axes(handles.axes3);
bar(t,Mes4,'g');
gridon
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN ABRIL')
axes(handles.axes6);
l=polyfit(t,Mes4,2);
lineal = l(1)*t + l(2);
plot(t,Mes4,'b*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
grid on
PrecTotMes = sum(Mes4);
set(handles.Abr1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes4));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes4);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes4);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Abr2,'String',MedDayMes)
MedDayAnual = mean(Mes4(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes4);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes4(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Mayo'
t=[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,2
7,28,29,30,31];
Mes5=[0,0,0.01,0.41,2.93,0.01,0,0.06,0,0.06,0.02,0,0,0,0,0,0,1.21,0.02,0,
0,1.33,0,0,0,0.01,0,0,0,0,0];
axes(handles.axes3);
bar(t,Mes5,'y');
gridon
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN MAYO')
axes(handles.axes6);

l=polyfit(t,Mes5,2);
lineal = l(1)*t + l(2);
plot(t,Mes5,'g*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
grid on
PrecTotMes = sum(Mes5);
set(handles.May1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes5));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes5);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes5);
set(handles.MediaMes,'String',MedDayMes)
set(handles.May2,'String',MedDayMes)
MedDayAnual = mean(Mes5(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes5);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes5(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Junio'
t=[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,2
7,28,29,30,31];
Mes6=[0.01,0.74,0,0,0.4,0.03,0.82,0.63,1.59,0.58,0.02,0,0.1,0,0,0,0.23,0.
08,0,0,0,0,0.03,0,0,0.05,0.12,0,0,0.79,0];
axes(handles.axes3);
bar(t,Mes6,'m');
gridon
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN JUNIO')
axes(handles.axes6);
l=polyfit(t,Mes6,2);
lineal = l(1)*t + l(2);
plot(t,Mes6,'b*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
grid on
PrecTotMes = sum(Mes6);
set(handles.Jun1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes6));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes6);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes6);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Jun2,'String',MedDayMes)

MedDayAnual = mean(Mes6(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes6);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes6(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Julio'
t=[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,2
7,28,29,30,31];
Mes7=[0.99,0.17,3.48,1.48,0.09,1.36,0.7,0.09,0.07,0.71,0.02,0,0,0.87,0.01
,0,0.99,0,0.01,0,0.12,0.16,0,0,0,0,0.51,0,0,0,0.3];
axes(handles.axes3);
bar(t,Mes7,'c');
grid on
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN JULIO')
axes(handles.axes6);
l=polyfit(t,Mes7,2);
lineal = l(1)*t + l(2);
plot(t,Mes7,'g*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
gridon
PrecTotMes = sum(Mes7);
set(handles.Jul1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes7));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes7);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes7);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Jul2,'String',MedDayMes)
MedDayAnual = mean(Mes7(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes7);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes7(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Agosto'
t=[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,2
7,28,29,30,31];

Mes8=[0.02,0.01,0,0,0.06,0.06,0.45,0.02,0.12,0.26,0.32,0.38,0.02,0,0,0,0.
15,0.24,0.92,0,0,0,0,0,0,0,0,0,0.2,0,0];
axes(handles.axes3);
bar(t,Mes8,'g');
grid on
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN AGOSTO')
axes(handles.axes6);
l=polyfit(t,Mes8,2);
lineal = l(1)*t + l(2);
plot(t,Mes8,'b*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
grid on
PrecTotMes = sum(Mes8);
set(handles.Ago1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes8));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes8);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes8);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Ago2,'String',MedDayMes)
MedDayAnual = mean(Mes8(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes8);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes8(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Septiembre'
t=[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,2
7,28,29,30,31];
Mes9=[0.18,0.01,0.22,0,0,0,0,0,0,0,0,0.2,0.02,0,0,0,0,0.01,0,0,0.96,0.04,
0,0,0.91,0,0,0,0,0,0];
axes(handles.axes3);
bar(t,Mes9,'r');
gridon
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN SEPTIEMBRE')
axes(handles.axes6);
l=polyfit(t,Mes9,2);
lineal = l(1)*t + l(2);
plot(t,Mes9,'g*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
grid on
PrecTotMes = sum(Mes9);

set(handles.Sep1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes9));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes9);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes9);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Sep2,'String',MedDayMes)
MedDayAnual = mean(Mes9(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes9);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes9(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Octubre'
t=[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,2
7,28,29,30,31];
Mes10=[0,0,0,0,0,0,1.27,0,0,0,0,0,0.26,0.05,0,0,0.03,0,0,0,0,0,0.01,0,0,0
,0,0.06,0,0,0];
axes(handles.axes3);
bar(t,Mes10,'c');
gridon
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN OCTUBRE')
axes(handles.axes6);
l=polyfit(t,Mes10,2);
lineal = l(1)*t + l(2);
plot(t,Mes10,'b*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
grid on
PrecTotMes = sum(Mes10);
set(handles.Oct1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes10));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes10);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes10);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Oct2,'String',MedDayMes)
MedDayAnual = mean(Mes10(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes10);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);

grid on
DesStnAnual = std(Mes10(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Noviembre'
t=[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,2
7,28,29,30,31];
Mes11=[0,0.03,0,0,0,0,0.04,0,0,0,0,0,0,0,0.04,0.01,0.26,0.05,0,0,0.07,0,0
,0,0,2.2,0.14,0,0,0,0];
axes(handles.axes3);
bar(t,Mes11,'m');
grid on
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')
title('PRECIPITACIN NOVIEMBRE')
axes(handles.axes6);
l=polyfit(t,Mes11,2);
lineal = l(1)*t + l(2);
plot(t,Mes11,'g*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
gridon
PrecTotMes = sum(Mes11);
set(handles.Nov1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes11));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes11);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes11);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Nov2,'String',MedDayMes)
MedDayAnual = mean(Mes11(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes11);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
grid on
DesStnAnual = std(Mes11(:));
set(handles.EstAnual,'String',DesStnAnual)
case'Diciembre'
t=[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,2
7,28,29,30,31];
Mes12=[0,0,0,0.01,0.27,0.35,0,0.06,0.18,0.31,0,0,0,0.59,0.07,0,0,0,0,0,0.
24,2.39,0.22,0,0,0,0,0.29,0.38,0,0];
axes(handles.axes3);
bar(t,Mes12,'g');
grid on
xlabel('Tiempo (Das)')
ylabel('Precipitacin (Pulgadas)')

title('PRECIPITACIN DICIEMBRE')
axes(handles.axes6);
l=polyfit(t,Mes12,2);
lineal = l(1)*t + l(2);
plot(t,Mes12,'b*',t,lineal,'r','linewidth',2);
title('AJUSTE LINEAL')
gridon
PrecTotMes = sum(Mes12);
set(handles.Dic1,'String',PrecTotMes)
PrecTotAnual = sum(PrecTotMes);
set(handles.TotAnual,'String',PrecTotAnual)
[MaxAnual,Day] = max(max(Mes12));
set(handles.MaxMes,'String',[MaxAnual,Day])
[MaxAnual,Mes] = max(Mes12);
set(handles.MaxDia,'String',[MaxAnual,Mes])
MedDayMes = mean(Mes12);
set(handles.MediaMes,'String',MedDayMes)
set(handles.Dic2,'String',MedDayMes)
MedDayAnual = mean(Mes12(:));
set(handles.MedAnual,'String',MedDayAnual)
DesStnMes = std(Mes12);
set(handles.EstMes,'String',DesStnMes)
axes(handles.axes2);
hist(DesStnMes);
gridon
DesStnAnual = std(Mes12(:));
set(handles.EstAnual,'String',DesStnAnual)
end
guidata(hObject,handles);

% Hints: contents = get(hObject,'String') returns popupmenu1 contents as


cell array
%
contents{get(hObject,'Value')} returns selected item from
popupmenu1

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


function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject
handle to popupmenu1 (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 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)
set(handles.TotAnual,'string', ' ');
set(handles.MaxMes,'string', ' ');
set(handles.MaxDia,'string', ' ');
set(handles.MedAnual,'string', ' ');
set(handles.MediaMes,'string', ' ');
set(handles.EstMes,'string', ' ');
set(handles.EstAnual,'string', ' ');
% --- 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)
close

% --- Executes on button press in pushbutton4.


function pushbutton4_Callback(hObject, eventdata, handles)
% hObject
handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
%set(handles.current_data);

Você também pode gostar