Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

function varargout = ZAPATAS(varargin)

% ZAPATAS MATLAB code for ZAPATAS.fig


%
ZAPATAS, by itself, creates a new ZAPATAS or raises the
existing
%
singleton*.
%
%
TEXX = ZAPATAS returns the handle to a new ZAPATAS or the
handle to
%
the existing singleton*.
%
%
ZAPATAS('CALLBACK',hObject,eventData,handles,...) calls the
local
%
function named CALLBACK in ZAPATAS.M with the given input
arguments.
%
%
ZAPATAS('Property','Value',...) creates a new ZAPATAS or raises
the
%
existing singleton*. Starting from the left, property value
pairs are
%
applied to the GUI before ZAPATAS_OpeningFcn gets called. An
%
unrecognized property name or invalid value makes property
application
%
stop. All inputs are passed to ZAPATAS_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 ZAPATAS
% Last Modified by GUIDE v2.5 28-Apr-2016 02:38:24
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ZAPATAS_OpeningFcn, ...
'gui_OutputFcn', @ZAPATAS_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 ZAPATAS is made visible.


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

% --- Outputs from this function are returned to the command line.
function varargout = ZAPATAS_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;

% --- Executes on button press in calcular.


function calcular_Callback(hObject, eventdata, handles)
% hObject
handle to calcular (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
%seccion de la columna
lc=str2num(get(handles.lc,'string'));
pc=str2num(get(handles.pc,'string'));
%numero de varilla de acero
var=str2num(get(handles.var,'string'));
%carga muerta
pd=str2num(get(handles.pd,'string'));
%carga viva
pl=str2num(get(handles.pl,'string'));
%peso especifico del suelo
pes=str2num(get(handles.pes,'string'));
%carga del suelo
cs=str2num(get(handles.cs,'string'));
%sobrecarga
sc=str2num(get(handles.sc,'string'));
%fc zapata

fcz=str2num(get(handles.fcz,'string'));
%fc columna
fcc=str2num(get(handles.fcc,'string'));
%fc del acero
fca=str2num(get(handles.fca,'string'));
%espesor de concreto encima de la zapata
ec=str2num(get(handles.ec,'string'));
%espesor del suelo encima de la zapata
es=str2num(get(handles.es,'string'));
%dimensionamiento de la zapata
Ldb1=0.08*(var*2.54/8)*(fca/(fcz^0.5))
Ldb2=0.004*(var*2.54/8)*(fca)
Ldbb=max(Ldb1,Ldb2)
Ldb = round(Ldbb)
d=Ldb
ha=d+10
%Capacidad portante neta del suelo:
qsn=cs-es*pes/1000000 -(ha)*2.4/1000 - ec*2.4/1000 -sc/10000

area=(pd+pl)*1000/qsn
long=area^0.5
long=fix(long)

set(handles.ldb,'string',num2str(Ldb));
set(handles.d,'string',num2str(d));
set(handles.h,'string',num2str(ha));
set(handles.qsn,'string',num2str(qsn));
set(handles.a,'string',num2str(area));
set(handles.l,'string',num2str(long));

function ldb_Callback(hObject, eventdata, handles)


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

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


function ldb_CreateFcn(hObject, eventdata, handles)
% hObject
handle to ldb (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 d_Callback(hObject, eventdata, handles)


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

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


function texxx_CreateFcn(hObject, eventdata, handles)
% hObject
handle to texxx (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 h_Callback(hObject, eventdata, handles)


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

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


function texx_CreateFcn(hObject, eventdata, handles)
% hObject
handle to texx (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 var_Callback(hObject, eventdata, handles)


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

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


function var_CreateFcn(hObject, eventdata, handles)
% hObject
handle to var (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 lc_Callback(hObject, eventdata, handles)

% hObject
% eventdata
% handles

handle to lc (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 lc as text


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

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


function lc_CreateFcn(hObject, eventdata, handles)
% hObject
handle to lc (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 pd_Callback(hObject, eventdata, handles)


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

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


function pd_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pd (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 pl_Callback(hObject, eventdata, handles)


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


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

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


function pl_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pl (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 pes_Callback(hObject, eventdata, handles)


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

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


function pes_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pes (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 cs_Callback(hObject, eventdata, handles)


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


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

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


function cs_CreateFcn(hObject, eventdata, handles)
% hObject
handle to cs (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 sc_Callback(hObject, eventdata, handles)


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

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


function sc_CreateFcn(hObject, eventdata, handles)
% hObject
handle to sc (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 fcz_Callback(hObject, eventdata, handles)


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

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


a double

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


function fcz_CreateFcn(hObject, eventdata, handles)
% hObject
handle to fcz (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 fcc_Callback(hObject, eventdata, handles)


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

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


function fcc_CreateFcn(hObject, eventdata, handles)
% hObject
handle to fcc (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 fca_Callback(hObject, eventdata, handles)


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

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


function fca_CreateFcn(hObject, eventdata, handles)
% hObject
handle to fca (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 ec_Callback(hObject, eventdata, handles)


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

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


function ec_CreateFcn(hObject, eventdata, handles)
% hObject
handle to ec (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 pc_Callback(hObject, eventdata, handles)


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

10

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


function pc_CreateFcn(hObject, eventdata, handles)
% hObject
handle to pc (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 es_Callback(hObject, eventdata, handles)


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

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


function es_CreateFcn(hObject, eventdata, handles)
% hObject
handle to es (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 qsn_Callback(hObject, eventdata, handles)


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

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


function qsn_CreateFcn(hObject, eventdata, handles)

11

% hObject
% eventdata
% handles
called

handle to qsn (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

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

function a_Callback(hObject, eventdata, handles)


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

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


function a_CreateFcn(hObject, eventdata, handles)
% hObject
handle to a (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 l_Callback(hObject, eventdata, handles)


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

12

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


double

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


function l_CreateFcn(hObject, eventdata, handles)
% hObject
handle to l (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 rs_Callback(hObject, eventdata, handles)


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

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


function rs_CreateFcn(hObject, eventdata, handles)
% hObject
handle to rs (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 df_Callback(hObject, eventdata, handles)


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

13

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


function df_CreateFcn(hObject, eventdata, handles)
% hObject
handle to df (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 hf_Callback(hObject, eventdata, handles)


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

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


function hf_CreateFcn(hObject, eventdata, handles)
% hObject
handle to hf (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 lf_Callback(hObject, eventdata, handles)


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

14

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


function lf_CreateFcn(hObject, eventdata, handles)
% hObject
handle to lf (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 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)
%seccion de la columna
lc=str2num(get(handles.lc,'string'));
pc=str2num(get(handles.pc,'string'));
%numero de varilla de acero
var=str2num(get(handles.var,'string'));
%carga muerta
pd=str2num(get(handles.pd,'string'));
%carga viva
pl=str2num(get(handles.pl,'string'));
%peso especifico del suelo
pes=str2num(get(handles.pes,'string'));
%carga del suelo
cs=str2num(get(handles.cs,'string'));
%sobrecarga
sc=str2num(get(handles.sc,'string'));
%fc zapata
fcz=str2num(get(handles.fcz,'string'));
%fc columna
fcc=str2num(get(handles.fcc,'string'));
%fc del acero
fca=str2num(get(handles.fca,'string'));
%espesor de concreto encima de la zapata
ec=str2num(get(handles.ec,'string'));
%espesor del suelo encima de la zapata
es=str2num(get(handles.es,'string'));
%peralte efectivo redondeado
df=str2num(get(handles.df,'string'));
% altura neta de la zapata
hf=str2num(get(handles.hf,'string'));
%longitud redondeada de la zapata
lf=str2num(get(handles.lf,'string'));
%coeficienta para distintos tipos de columnas

15

alfa=str2num(get(handles.alf,'string'));

rs=(pd+pl)*1000/(lf^2)
ras=(1.4*pd*1000 +1.7*pl*1000)/(lf^2)
qsn=cs-es*pes/1000000 -(hf)*2.4/1000 - ec*2.4/1000 -sc/10000
%verificacion del corte
%por flexion
%cortante ultima
vuf=ras*(lf/2 - df -lc/2)*lf
%la resistencia del concreto al corte por fleccion
vcf=0.53*0.85*(fcz^0.5)*df*lf
%por punzonamiento
%cortante ultima
vup=ras*((lf^2) - ((lc+df)^2))
%la resistencia del concreto al corte por punzonamiento
%primera forma
vc1=0.85*0.27*(6)*(fcz^0.5)*df*4*(lc+df)
%segunda forma
vc2=0.85*0.27*(alfa*df/(4*(lc+df)) + 2)*(fcz^0.5)*df*4*(lc+df)
%tercera forma
vc3=0.85*1.1*df*4*(lc+df)*(fcz^0.5)
%Formula para zapatas
mu=0.5*ras*lf*((lf/2 -lc/2)^2)
%Formula para vigas
w1=(1-(1-4*0.59*mu/(0.9*fcz*lf*df*df))^0.5)/1.18
w2=(1+(1-4*0.59*mu/(0.9*fcz*lf*df*df))^0.5)/1.18
w=min(w1,w2)
cuantia=w*fcz*100/fca
acero=cuantia*lf*df/100
aceromin=0.0018*lf*hf
%verificacion columna- zapata
pu=(pd+pl)*1000
rel=(lf*lf/(lc*pc))^0.5
rell=min(rel,2)
upu=0.7*0.85*fcz*lc*pc*rell

set(handles.rs,'string',num2str(rs));

16

set(handles.qsnu,'string',num2str(ras));
set(handles.vuf,'string',num2str(vuf));
set(handles.vf,'string',num2str(vcf));
set(handles.vup,'string',num2str(vup));
set(handles.vc1,'string',num2str(vc1));
set(handles.vc2,'string',num2str(vc2));
set(handles.vc3,'string',num2str(vc3));
set(handles.rs,'string',num2str(qsn));
set(handles.mu,'string',num2str(mu));
set(handles.cuant,'string',num2str(cuantia));
set(handles.acero,'string',num2str(acero));
set(handles.amini,'string',num2str(aceromin));
set(handles.lol,'string',num2str(pu));
set(handles.loll,'string',num2str(upu));

function qsnu_Callback(hObject, eventdata, handles)


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

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


function qsnu_CreateFcn(hObject, eventdata, handles)
% hObject
handle to qsnu (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 vup_Callback(hObject, eventdata, handles)


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

17

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


function vup_CreateFcn(hObject, eventdata, handles)
% hObject
handle to vup (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 vuf_Callback(hObject, eventdata, handles)


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

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


function vuf_CreateFcn(hObject, eventdata, handles)
% hObject
handle to vuf (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 vf_Callback(hObject, eventdata, handles)


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

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

18

function vf_CreateFcn(hObject, eventdata, handles)


% hObject
handle to vf (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 vc1_Callback(hObject, eventdata, handles)


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

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


function vc1_CreateFcn(hObject, eventdata, handles)
% hObject
handle to vc1 (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 vc2_Callback(hObject, eventdata, handles)


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

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


function vc2_CreateFcn(hObject, eventdata, handles)
% hObject
handle to vc2 (see GCBO)

19

% eventdata
% handles
called

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


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

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


function vc3_CreateFcn(hObject, eventdata, handles)
% hObject
handle to vc3 (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 alf_Callback(hObject, eventdata, handles)


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

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


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

20

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


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

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


function mu_CreateFcn(hObject, eventdata, handles)
% hObject
handle to mu (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 cuant_Callback(hObject, eventdata, handles)


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

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


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

21

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


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

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


function acero_CreateFcn(hObject, eventdata, handles)
% hObject
handle to acero (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 amini_Callback(hObject, eventdata, handles)


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

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


function amini_CreateFcn(hObject, eventdata, handles)
% hObject
handle to amini (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.

22

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

function lol_Callback(hObject, eventdata, handles)


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

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


function lol_CreateFcn(hObject, eventdata, handles)
% hObject
handle to lol (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 loll_Callback(hObject, eventdata, handles)


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

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


function loll_CreateFcn(hObject, eventdata, handles)
% hObject
handle to loll (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.

23

if ispc && isequal(get(hObject,'BackgroundColor'),


get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
Error using feval
Undefined function 'h_CreateFcn' for input arguments of type
'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in ZAPATAS (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)ZAPATAS('h_CreateFcn',hObject,eventdata,guidata(hObject))

Error using feval


Undefined function 'd_CreateFcn' for input arguments of type
'matlab.ui.control.UIControl'.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in ZAPATAS (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)ZAPATAS('d_CreateFcn',hObject,eventdata,guidata(hObject))

24

Published with MATLAB R2015a

25

You might also like