Está en la página 1de 24

UNIVERSIDAD AUTNOMA DE

YUCATN
FACULTAD DE INGENIERA QUMICA

SEPARACIONES MECNICAS
Programa Anlisis Granulomtrico

INTEGRANTES:
ANDRADE MO CINTIA LIZETTE
CRUZ RAMAYO DIDIER MANUEL
GONZLEZ SUASTE KAREN MARA
RICALDE CAB ZULMA GUADALUPE
TREJO ARJONA VANESSA VALERIA

PROFESOR: Dr. CARLOS MANUEL


RUBIO ATOCHE

MRIDA YUCATN A 3 DE FEBRERO DE 2015

Granulometra
Descripcin: Crear un programa que calcule el porcentaje de una muestra en
un proceso de tamizado.
La granulometra consiste en que una muestra determinada pasa por una serie
de tamices (mallas) de distintos dimetros, el nmero de tamices vara de
acuerdo al proceso.

Instrucciones del programa:


1. Presionar el botn iniciar para activar el programa.
2. Indicar el tamao inicial de la muestra.
3. Seleccionar uno por uno el nmero de tamices que se desea utilizar en el
proceso de tamizado al igual que registrar el peso retenido en el tamiz. (La
serie de tamices es variable, se pueden seleccionar 3 tamices, 10 tamices
etc. Dependiendo del proceso)
4. Presionar el botn agregar, el tamiz seleccionado se registra
automticamente en la tabla de datos (tamao de tamices, la abertura y
peso retenido)
5. Al momento de dar click en el botn de calcular automticamente la tabla
arroja los resultados de las columnas % Ret. Parcial, % Ret. Acumulado y %
que pasa al igual que aparece una grfica en donde las ordenadas
representa los porcentajes que pasa y en las abscisas son los dimetros de
los tamices en milmetros.
6. Los clculos para llenar la tabla del anlisis granulomtrico de la muestra
son los siguientes:
Porcentaje retenido parcial:

%Retenido parcial i=

Peso ret . parcial i


100
Peso total

Porcentaje retenido acumulado:

%Retenido acumi=%Ret. acum ( i1 ) +%Ret. parcial i


Porcentaje que pasa por el tamiz:

%Pasa tamiz i=100%Ret. parcial i

7.

Si se desea eliminar los datos y realizar otros clculos se da click en el


botn Reset.

Datos del nmero y la abertura de los tamices:


N. de Tamiz
5 pulg
4,24 pulg
3 pulg
3 pulg
2 pulg
2,12 pulg
1 pulg
1 pulg
1,06 pulg
7/8 pulg
pulg
5/8 pulg
0,53 pulg
7/16 pulg
3/8 pulg
5/16 pulg
0,265 pulg
No. 3
No. 4
No. 5
No. 6
No. 7
No. 8
No. 10
No. 12
No. 14
No. 16
No. 18
No. 20
No. 25
No. 30
No. 35
No. 40
No. 45
No. 50
No. 60
No. 70
No. 80
No. 100
No. 120
No. 140
No. 170

Abertura (mm)
125 mm
106 mm
90 mm
75 mm
63 mm
53 mm
45 mm
37,5 mm
31,5 mm
26,5 mm
22,4 mm
19,0 mm
16,0 mm
13,2 mm
11,2 mm
9,5 mm
8,0 mm
6,7 mm
5,6 mm
4,75 mm
4,00 mm
3,35 mm
2,80 mm
2,36 mm
2,00 mm
1,70 mm
1,40 mm
1,18 mm
1,00 mm
850 m
710 m
600 m
500 m
425 m
355 m
300 m
250 m
212 m
180 m
150 m
125 m
106 m
90 m

No. 200
No. 230
No. 270
No. 325
No.400

75
63
53
45
38

m
m
m
m
m

Cdigo del programa


function varargout = granulometria(varargin)
% GRANULOMETRIA M-file for granulometria.fig
%
GRANULOMETRIA, by itself, creates a new GRANULOMETRIA or raises
the existing
%
singleton*.
%
%
H = GRANULOMETRIA returns the handle to a new GRANULOMETRIA or the
handle to
%
the existing singleton*.
%
%
GRANULOMETRIA('CALLBACK',hObject,eventData,handles,...) calls the
local
%
function named CALLBACK in GRANULOMETRIA.M with the given input
arguments.
%
%
GRANULOMETRIA('Property','Value',...) creates a new GRANULOMETRIA
or raises the
%
existing singleton*. Starting from the left, property value pairs
are
%
applied to the GUI before granulometria_OpeningFcn gets called.
An
%
unrecognized property name or invalid value makes property
application
%
stop. All inputs are passed to granulometria_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 granulometria
% Last Modified by GUIDE v2.5 14-Mar-2015 15:35:16
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @granulometria_OpeningFcn, ...
'gui_OutputFcn', @granulometria_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 granulometria is made visible.


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

% --- Outputs from this function are returned to the command line.
function varargout = granulometria_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 setGlobalVariable1(var)
global x;
x=var;
%as<zdada

function r=getGlobalV1
global x;
r= x;
%asdasd

function setGlobalVariable2(var)
global y;
y=var;

%as<zdada

function r=getGlobalV2
global y;
r= y;
function setGV(var)
global z;
z=var
function r=getGV
global z;
r=z;
function setC(var)
global c;
c=var
function r=getC
global c;
r=c;
function setD(var)
global d;
d=var
function r=getD
global d;
r=d;
function setE(var)
global q
q=var;
function r=getE
global q
r=q;
function setL(var)
global l
l=var;
function r=getL
global l
r=l;

function setL2(var)
global l1
l1=var;
function r=getL2

global l1
r=l1;

function setL3(var)
global l2
l2=var;
function r=getL3
global l2
r=l2;

function setL4(var)
global l3
l3=var;
function r=getL4
global l3
r=l3;
function r=mayor(x)
aux=cell2mat(x(1))
n=getGV
n=n-1
for i=2:n
if aux<cell2mat(x(i))
aux=[];
aux=cell2mat(x(i));
end
end
r=aux
% --- Executes on button press in pbReset.
function pbReset_Callback(hObject, eventdata, handles)
v=1;
setGV(v);
x={};
y={};
z={};
setC(x);
setD(y);
setE(z);
datos= [x' y'];
set(handles.uitable1,'data',datos);
set(handles.pesoMuestra,'string',' ');
set(handles.pesoRet,'string',' ');
set(handles.pbCalcular,'Enable','off');
set(handles.pbAgregar,'Enable','off');
%MM=fliplr(B);
%NN=log10(MM);
%[XX,YY]=meshgrid(NN,K);
line = getL;
line2=getL2;

line3=getL3;
line4=getL4;
delete(line);
delete(line2);
delete(line3);
delete(line4);
%plot(XX,YY,'k-');
%hold on
%set(gca,'Xdir','reverse'); % valores en ornden inverso

% --- Executes on button press in pbCalcular.


function pbCalcular_Callback(hObject, eventdata, handles)
% ANALISIS GRANULOMETRICO POR TAMIZADO
C=getC;
D=getD;
E=getE;
pm=str2double(get(handles.pesoMuestra,'string'));% peso de la muestra
n=getGV;
n=n-1;
pr=0;
for i=1:n
pr=pr+cell2mat(E(i));
end
pr
pt=(pm+pr);% peso total de la muestra
pt
% %RETENIDO PARCIAL
prp={};
for i=1:n
val=(cell2mat(E(i))/pt)*100
prp(i)={val};
end
prp
% %RETENIDO ACUMULADO
pra={};
pra(1)=prp(1);
for i=2:n
val=cell2mat(pra(i-1))+cell2mat(prp(i));
pra(i)={val};
end
pra
% %QUE PASA
pti={};
for i=1:n
val=100-cell2mat(prp(i));
pti(i)={val};
end
pti

datos=[C' D' E' prp' pra' pti'];


set(handles.uitable1,'data',datos);
B=[];
K=[];
for i=1:n
K(i)=cell2mat(pti(i));
B(i)=cell2mat(D(i));
end
W=sort(B,'ascend');
W
xm=W(1);
Q=sort(K,'ascend');
Q
xm=mayor(D)
xmin=0;
xmax=xm;
ymin=0;
ymax=100;
axis([xmin xmax ymin ymax]);% limite de los ejes
%B=[38.1 25.4 19.05 12.7 9.525 6.35 4.76 2 0.84 0.42 0.25 0.149 0.106
0.074];
%K=[pp1 pp2 pp3 pp4 pp5 pp6 pp7 pp8 pp9 pp10 pp11 pp12 pp13 pp14];
line4=plot(log10(W),Q,'m--','linewidth',5)
setL4(line4);
MM=fliplr(W);
NN=log10(MM);
[XX,YY]=meshgrid(NN,K);
hold on
line=plot(XX,YY,'k-');
setL(line)
hold on
set(gca,'Xdir','reverse'); % valores en ornden inverso
xlabel('Abertura de la malla (mm)');
ylabel(' Porcentaje que pasa ');
grid on
zoom on
set(gca,'Xdir','reverse');% valores en orden inverso PARA EL EJE X
axis tight
figure(1)
axis tight
xmin=0;
xmax=log10(xm);
ymin=0;
ymax=100;
axis([xmin xmax ymin ymax]);
MM=fliplr(W);% VALORES EN ORDEN INVERSO
NN=log10(MM);% LOGARITMO EN BASE 10
[XX,YY]=meshgrid(NN,Q);
line2=plot(XX,YY,'k-')
setL2(line2);
hold on
line3=plot(log10(W),Q,'--m','linewidth',5);
setL3(line3);

hold on
set(gca,'Xdir','reverse');
prp={};
pra={};
pti={};

function pesoMuestra_Callback(hObject, eventdata, handles)


% hObject
handle to pesoMuestra (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
Numero=get(hObject,'String');
if(~isempty(Numero))
set(handles.pbCalcular,'Enable','on');
else
set(handles.pbCalcular,'Enable','off');
end

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


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

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


function pesoMuestra_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pesoMuestra (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 pushbutton3.


function pushbutton3_Callback(hObject, eventdata, handles)
Brush
% hObject

handle to pushbutton3 (see GCBO)

% eventdata
% handles

reserved - to be defined in a future version of MATLAB


structure with handles and user data (see GUIDATA)

% --- 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)

% --- Executes during object deletion, before destroying properties.


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

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


function pbReset_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pbReset (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called

% --- Executes on selection change in selectTamiz.


function selectTamiz_Callback(hObject, eventdata, handles)
% hObject
handle to selectTamiz (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns selectTamiz
contents as cell array
%
contents{get(hObject,'Value')} returns selected item from
selectTamiz

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


function selectTamiz_CreateFcn(hObject, eventdata, handles)
% hObject
handle to selectTamiz (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 pbAgregar.


function pbAgregar_Callback(hObject, eventdata, handles)
% hObject
handle to pbAgregar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
v=get(handles.selectTamiz,'value');
r=getGV;
T=getGlobalV1;
R=getGlobalV2;
C=getC;
D=getD;
E=getE;
T(v)
C(r)=T(v);
D(r)=R(v);
valor=get(handles.pesoRet,'string');
valor=str2double(valor);
E(r)={valor};
datos=[C' D' E'];
set(handles.uitable1,'data',datos);
setC(C);
setD(D);
setE(E);
r=r+1;
setGV(r);

function pesoRet_Callback(hObject, eventdata, handles)


% hObject
handle to pesoRet (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
Numero=get(hObject,'String');
if(~isempty(Numero))
set(handles.pbAgregar,'Enable','on');
Numero=zeros(0);
else
set(handles.pbAgregar,'Enable','off');
end

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


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

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


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

% --- Executes on button press in pbIniciar.


function pbIniciar_Callback(hObject, eventdata, handles)
% hObject
handle to pbIniciar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
A={'5"' '4.24"' '3(1/2)"' '3"' '2(1/2)' '2.12"' '1(3/4)"' '1(1/4)"'
'1.06"' '7/8"' '3/4"' '5/8"' '0.53"' '7/16"' '3/8"' '5/16"' '0.265"'
'N3(1/2)' 'N4' 'N5' 'N6' 'N7' 'N8' 'N10' 'N12' 'N14' 'N16'
'N18' 'N20' 'N25' 'N30' 'N35' 'N40' 'N45' 'N50' 'N60' 'N70'
'N80' 'N100' 'N120' 'N140' 'N170' 'N200' 'N230' 'N270' 'N325'
'N400'};
P={125 106 90 75 63 53 45 31.5 26.5 22.4 19.0 16.0 13.2 11.2 9.5 8.0 6.7
5.6 4.75 4.00 3.35 2.80 2.36 2.00 1.70 1.40 1.18 1.00 0.850 0.710 0.600
0.500 0.425 0.355 0.300 0.250 0.212 0.180 0.150 0.125 0.106 0.090 0.075
0.063 0.053 0.045 0.038};
setGlobalVariable1(A);
setGlobalVariable2(P);
%C=[A(1) A(2)];
%D=[P(1) P(2)];
%datos=[C' D'];
v=1;
setGV(v);
x={};
y={};
z={};
setC(x);
setD(y);
setE(z);
set(handles.pbReset,'Enable','on');
set(handles.selectTamiz,'Enable','on');
%set(handles.uitable1,'data',datos);

Nota
Grafica 1: Dm Dp

Cdigo
function varargout = granulometria(varargin)
% GRANULOMETRIA M-file for granulometria.fig
%
GRANULOMETRIA, by itself, creates a new GRANULOMETRIA or raises
the existing
%
singleton*.
%
%
H = GRANULOMETRIA returns the handle to a new GRANULOMETRIA or the
handle to
%
the existing singleton*.
%
%
GRANULOMETRIA('CALLBACK',hObject,eventData,handles,...) calls the
local
%
function named CALLBACK in GRANULOMETRIA.M with the given input
arguments.
%
%
GRANULOMETRIA('Property','Value',...) creates a new GRANULOMETRIA
or raises the
%
existing singleton*. Starting from the left, property value pairs
are
%
applied to the GUI before granulometria_OpeningFcn gets called.
An
%
unrecognized property name or invalid value makes property
application
%
stop. All inputs are passed to granulometria_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 granulometria
% Last Modified by GUIDE v2.5 14-Mar-2015 15:35:16
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @granulometria_OpeningFcn, ...
'gui_OutputFcn', @granulometria_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 granulometria is made visible.


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

% --- Outputs from this function are returned to the command line.
function varargout = granulometria_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 setGlobalVariable1(var)
global x;
x=var;
%as<zdada

function r=getGlobalV1
global x;
r= x;
%asdasd

function setGlobalVariable2(var)
global y;
y=var;
%as<zdada

function r=getGlobalV2
global y;
r= y;

function setGV(var)
global z;
z=var
function r=getGV
global z;
r=z;
function setC(var)
global c;
c=var
function r=getC
global c;
r=c;
function setD(var)
global d;
d=var
function r=getD
global d;
r=d;
function setE(var)
global q
q=var;
function r=getE
global q
r=q;
function setL(var)
global l
l=var;
function r=getL
global l
r=l;

function setL2(var)
global l1
l1=var;
function r=getL2
global l1
r=l1;

function setL3(var)
global l2
l2=var;
function r=getL3

global l2
r=l2;

function setL4(var)
global l3
l3=var;
function r=getL4
global l3
r=l3;
function r=mayor(x)
aux=cell2mat(x(1))
n=getGV
n=n-1
for i=2:n
if aux<cell2mat(x(i))
aux=[];
aux=cell2mat(x(i));
end
end
r=aux
% --- Executes on button press in pbReset.
function pbReset_Callback(hObject, eventdata, handles)
v=1;
setGV(v);
x={};
y={};
z={};
setC(x);
setD(y);
setE(z);
datos= [x' y'];
set(handles.uitable1,'data',datos);
set(handles.pesoMuestra,'string',' ');
set(handles.pesoRet,'string',' ');
set(handles.pbCalcular,'Enable','off');
set(handles.pbAgregar,'Enable','off');
%MM=fliplr(B);
%NN=log10(MM);
%[XX,YY]=meshgrid(NN,K);
line = getL;
line2=getL2;
line3=getL3;
line4=getL4;
delete(line);
delete(line2);
delete(line3);
delete(line4);
%plot(XX,YY,'k-');
%hold on
%set(gca,'Xdir','reverse'); % valores en ornden inverso

% --- Executes on button press in pbCalcular.


function pbCalcular_Callback(hObject, eventdata, handles)
% ANALISIS GRANULOMETRICO POR TAMIZADO
C=getC;
D=getD;
E=getE;
pm=str2double(get(handles.pesoMuestra,'string'));% peso de la muestra
n=getGV;
n=n-1;
pr=0;
for i=1:n
pr=pr+cell2mat(E(i));
end
pr
pt=(pm+pr);% peso total de la muestra
pt
% %RETENIDO PARCIAL
prp={};
for i=1:n
val=(cell2mat(E(i))/pt)*100
prp(i)={val};
end
prp
% %RETENIDO ACUMULADO
pra={};
pra(1)=prp(1);
for i=2:n
val=cell2mat(pra(i-1))+cell2mat(prp(i));
pra(i)={val};
end
pra
% %QUE PASA
pti={};
for i=1:n
val=100-cell2mat(prp(i));
pti(i)={val};
end
pti

datos=[C' D' E' prp' pra' pti'];


set(handles.uitable1,'data',datos);
B=[];
K=[];
for i=1:n
K(i)=cell2mat(pti(i));
B(i)=cell2mat(D(i));
end

W=sort(B,'ascend');
W
xm=W(1);
Q=sort(K,'ascend');
Q
xm=mayor(D)
xmin=0;
xmax=xm;
ymin=0;
ymax=100;
axis([xmin xmax ymin ymax]);% limite de los ejes
%B=[38.1 25.4 19.05 12.7 9.525 6.35 4.76 2 0.84 0.42 0.25 0.149 0.106
0.074];
%K=[pp1 pp2 pp3 pp4 pp5 pp6 pp7 pp8 pp9 pp10 pp11 pp12 pp13 pp14];
line4=plot(log10(W),Q,'m--','linewidth',5)
setL4(line4);
MM=fliplr(W);
NN=log10(MM);
[XX,YY]=meshgrid(NN,K);
hold on
line=plot(XX,YY,'k-');
setL(line)
hold on
set(gca,'Xdir','reverse'); % valores en ornden inverso
xlabel('Abertura de la malla (mm)');
ylabel(' Porcentaje que pasa ');
grid on
zoom on
set(gca,'Xdir','reverse');% valores en orden inverso PARA EL EJE X
axis tight
figure(1)
axis tight
xmin=0;
xmax=log10(xm);
ymin=0;
ymax=100;
axis([xmin xmax ymin ymax]);
MM=fliplr(W);% VALORES EN ORDEN INVERSO
NN=log10(MM);% LOGARITMO EN BASE 10
[XX,YY]=meshgrid(NN,Q);
line2=plot(XX,YY,'k-')
setL2(line2);
hold on
line3=plot(log10(W),Q,'--m','linewidth',5);
setL3(line3);
hold on
set(gca,'Xdir','reverse');
prp={};
pra={};
pti={};

function pesoMuestra_Callback(hObject, eventdata, handles)


% hObject
handle to pesoMuestra (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
Numero=get(hObject,'String');
if(~isempty(Numero))
set(handles.pbCalcular,'Enable','on');
else
set(handles.pbCalcular,'Enable','off');
end

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


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

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


function pesoMuestra_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pesoMuestra (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 pushbutton3.


function pushbutton3_Callback(hObject, eventdata, handles)
Brush
% hObject
% eventdata
% handles

handle to pushbutton3 (see GCBO)


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

% --- 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)

% --- Executes during object deletion, before destroying properties.


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

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


function pbReset_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pbReset (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called

% --- Executes on selection change in selectTamiz.


function selectTamiz_Callback(hObject, eventdata, handles)
% hObject
handle to selectTamiz (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns selectTamiz
contents as cell array
%
contents{get(hObject,'Value')} returns selected item from
selectTamiz

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


function selectTamiz_CreateFcn(hObject, eventdata, handles)
% hObject
handle to selectTamiz (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 pbAgregar.


function pbAgregar_Callback(hObject, eventdata, handles)
% hObject
handle to pbAgregar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
v=get(handles.selectTamiz,'value');
r=getGV;
T=getGlobalV1;

R=getGlobalV2;
C=getC;
D=getD;
E=getE;
T(v)
C(r)=T(v);
D(r)=R(v);
valor=get(handles.pesoRet,'string');
valor=str2double(valor);
E(r)={valor};
datos=[C' D' E'];
set(handles.uitable1,'data',datos);
setC(C);
setD(D);
setE(E);
r=r+1;
setGV(r);

function pesoRet_Callback(hObject, eventdata, handles)


% hObject
handle to pesoRet (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
Numero=get(hObject,'String');
if(~isempty(Numero))
set(handles.pbAgregar,'Enable','on');
Numero=zeros(0);
else
set(handles.pbAgregar,'Enable','off');
end

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


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

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


function pesoRet_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pesoRet (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 pbIniciar.


function pbIniciar_Callback(hObject, eventdata, handles)
% hObject
handle to pbIniciar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
A={'5"' '4.24"' '3(1/2)"' '3"' '2(1/2)' '2.12"' '1(3/4)"' '1(1/4)"'
'1.06"' '7/8"' '3/4"' '5/8"' '0.53"' '7/16"' '3/8"' '5/16"' '0.265"'
'N3(1/2)' 'N4' 'N5' 'N6' 'N7' 'N8' 'N10' 'N12' 'N14' 'N16'
'N18' 'N20' 'N25' 'N30' 'N35' 'N40' 'N45' 'N50' 'N60' 'N70'
'N80' 'N100' 'N120' 'N140' 'N170' 'N200' 'N230' 'N270' 'N325'
'N400'};
P={125 106 90 75 63 53 45 31.5 26.5 22.4 19.0 16.0 13.2 11.2 9.5 8.0 6.7
5.6 4.75 4.00 3.35 2.80 2.36 2.00 1.70 1.40 1.18 1.00 0.850 0.710 0.600
0.500 0.425 0.355 0.300 0.250 0.212 0.180 0.150 0.125 0.106 0.090 0.075
0.063 0.053 0.045 0.038};
setGlobalVariable1(A);
setGlobalVariable2(P);
%C=[A(1) A(2)];
%D=[P(1) P(2)];
%datos=[C' D'];
v=1;
setGV(v);
x={};
y={};
z={};
setC(x);
setD(y);
setE(z);
set(handles.pbReset,'Enable','on');
set(handles.selectTamiz,'Enable','on');
%set(handles.uitable1,'data',datos);

Nota
Grafica 1: Dm Dp

Bibliografa
Materiales de construccin granulomtrico , jos simen caas
D. Malagon H. Montenegro. Propiedades Fsicas de los Suelos. Intituto Geogrco A.Codazzi.,1990.
J.E. Bowles. Manual de Laboratorio de Suelos en Ingenieria Civil. McGraw-Hill, 1980.

También podría gustarte