Acoustic Singal Transmission Loss due to single or double wall

by

 

This simple guide enables the user to calculate the Transmission loss index in dB for a wall set.

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

% Last Modified by GUIDE v2.5 17-May-2011 15:53:25

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @Arquitectonica_OpeningFcn, ...
                   'gui_OutputFcn',  @Arquitectonica_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

% --- Executes just before Arquitectonica is made visible.
function Arquitectonica_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 Arquitectonica (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes Arquitectonica wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = Arquitectonica_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 selection change in listbox1.
function listbox1_Callback(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns listbox1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox1


% --- Executes during object creation, after setting all properties.
function listbox1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



%Listbox 2 permite la seleccion de diferentes materiales.

% --- Executes on selection change in listbox2.
function listbox2_Callback(hObject, eventdata, handles)
% hObject    handle to listbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
inf=get(hObject,'Value');
gos=get(hObject,'String');

switch inf
    case 1%propiedades del Aluminio
        CL=5420;
        ROw=2800;
        n0=0.001;
        E=73.1E9;
        pois=0.33;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 2%Propiedades del Cobre
        CL=3710;
        ROw=8710;
        n0=0.001;
        E=103.4E9;
        pois=0.37;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
        %set(handles.Prueba,'String',CL);
    case 3%Propiedades del Ladrillo
        CL=3800;
        ROw=1800;
        n0=0.015;
        E=25E9;
        pois=0.20;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
        %set(handles.Prueba,'String',CL);
    case 4%Propiedades del Corcho
        CL=675;
        ROw=750;
        n0=0.020;
        E=0.340E9;
        pois=0.08;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 5%Propiedades del Concreto
        CL=2960;
        ROw=2400;
        n0=0.020;
        E=20.7E9;
        pois=0.10;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 6%Propiedades del Vidrio
        CL=5450;
        ROw=2500;
        n0=0.0013;
        E=71E9;
        pois=0.21;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 7%Propiedades del Granito
        CL=4413;
        ROw=2690;
        n0=0.001;
        E=48.3E9;
        pois=0.28;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 8%Propiedades del DryWall
        CL=6790;
        ROw=650;
        n0=0.018;
        E=29.5E9;
        pois=0.13;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 9%Propiedades del Plomo
        CL=1206;
        ROw=11300;
        n0=0.015;
        E=13.8E9;
        pois=0.4;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 10%Propiedades del Lexan
        CL=1450;
        ROw=1200;
        n0=0.015;
        E=2.12E9;
        pois=0.40;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 11%Propiedades del MArmol
        CL=4600;
        ROw=2800;
        n0=0.001;
        E=55.2E9;
        pois=0.26;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 12%Propiedades del Ladrillo de Cemento
        CL=3120;
        ROw=1100;
        n0=0.007;
        E=10.6E9;
        pois=0.1;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 13%Propiedades del Yeso
        CL=4550;
        ROw=1700;
        n0=0.005;
        E=32E9;
        pois=0.3;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 14%Propiedades del Plexiglas
        CL=2035;
        ROw=1150;
        n0=0.020;
        E=4E9;
        pois=0.4;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 15%Propiedades madera aglomerada
        CL=3100;
        ROw=600;
        n0=0.030;
        E=4.86E9;
        pois=0.4;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 16%Propiedads del polietileno
        CL=765;
        ROw=935;
        n0=0.010;
        E=0.48E9;
        pois=0.35;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 17%Propiedades del Pyrex
        CL=5350;
        ROw=2300;
        n0=0.004;
        E=62E9;
        pois=0.24;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 18%propiedaes del caucho de alta densidad
        CL=1700;
        ROw=950;
        n0=0.080;
        E=2.3E9;
        pois=0.4;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 19%Propiedades del acero
        CL=5100;
        ROw=7700;
        n0=0.0013;
        E=200E9;
        pois=0.27;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 20%Propiedades del ocre
        CL=3860;
        ROw=770;
        n0=0.008;
        E=11.2E9;
        pois=0.15;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
    case 21%propiedades del pino
        CL=4680;
        ROw=640;
        n0=0.020;
        E=13.7E9;
        pois=0.15;
        handles.CL=CL;
        handles.ROw=ROw;
        handles.n0=n0;
        handles.E=E;
        handles.pois=pois;
end
   guidata(hObject,handles); 
    
    
    
        

% --- Executes during object creation, after setting all properties.
function listbox2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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


% --- Executes during object creation, after setting all properties.
function Prueba_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Prueba (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called


%Funcion A relaciona la altura de la particion
function a_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
a=str2double(NewStrVal);
handles.altura=a;
guidata(hObject,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 b_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
b=str2double(NewStrVal);
handles.ancho=b;
guidata(hObject,handles);
% hObject    handle to b (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of b as text
%        str2double(get(hObject,'String')) returns contents of b as a double


% --- Executes during object creation, after setting all properties.
function b_CreateFcn(hObject, eventdata, handles)
% hObject    handle to b (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



function h_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
h=str2double(NewStrVal);
handles.profundidad=h;
guidata(hObject,handles);
% hObject    handle to h (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 h as text
%        str2double(get(hObject,'String')) returns contents of h as a double


% --- Executes during object creation, after setting all properties.
function h_CreateFcn(hObject, eventdata, handles)
% hObject    handle to h (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 Calcular1.
function Calcular1_Callback(hObject, eventdata, handles)%Funcion que calcula los valores de TL para la particion sencilla

%definicion y calculo de parametros del material 1 de la primera particion
A=handles.altura;
B=handles.ancho;
H=handles.profundidad;
CLf=handles.CL;
Rowf=handles.ROw;
n0f=handles.n0;
Ef=handles.E;
poisf=handles.pois;
MS=Rowf*H;
handles.MS1=MS;
guidata(hObject,handles);
f11=(pi/(4*sqrt(3))*CLf*H*(((1/A)^2)+((1/B)^2)));%calculo de fmn para la region de funcionamiento I
fc=((sqrt(3)/pi)*((343)^2)/(CLf*H));%calculo de frecuencia critica

%Definicion de frecuencias a trabajar
RTA=[20;25;31.5;40;50;63;80;100;125;160;200;250;315;400;500;630;800;1000;1250;1600;2000;2500;3150;4000;5000;6000;8000;10000;12500;16000;20000;0];
%Compliancia mecanica del material escogido
Cs=((768*(1-(poisf^2)))/((pi^8)*Ef*(H^3)*((((1/A)^2)+((1/B)^2))^2)));
i=1;
a=RTA(i);
c=1;
while (a<f11)%calculo de TL aleatorio para region I
    ks(i)=4*pi*RTA(i)*1.18*343*Cs;
    TLa(c,1)=((10*log10(1/(ks(i)^2)))-(10*log10(log(1+(1/(ks(i)^2))))));
    i=i+1;
    c=c+1;
    a=RTA(i);   
end

while(a>f11)&&(a<fc)%Calculo de TL aleatorio para la region II
    TLa(c,1)=(10*log10(1+(((pi*RTA(i)*MS)/(1.18*343))^2)))-5;
    c=c+1;
    i=i+1;
    a=RTA(i);
end

while(a>fc)&&(a~=0)
    TLa(c,1)=(10*log10((1+((pi*MS*fc)/(1.18*343))^2)))+(10*log10(n0f))+(33.22*log10(RTA(i)/fc))-5.7;
    c=c+1;
    i=i+1;
    a=RTA(i);
end
TLa(32,1)=0;
%horzcat permite concatenar los vectores tl y freq una vez que tengan el
%mismo tamano para mostrarlo en la uitable
%el comando set permite mostrar los valores en la tabla
tabla=horzcat(RTA,TLa);
set(handles.tabla1,'data',tabla);
%axes(handles.axes1)
%semilogx(RTA,TLa,'-.or');
%axis tight
%grid on


% Definicion y calculo del material 2 de la primera particion
A2=handles.altura3;
B2=handles.ancho3;
H2=handles.profundidad3;
CLf2=handles.CL3;
Rowf2=handles.ROw3;
n0f2=handles.n03;
Ef2=handles.E3;
poisf2=handles.pois3;
MS2=Rowf*H;
handles.MS2=MS2;
guidata(hObject,handles);

if (A2==0)||(B2==0)||(H2==0)||(CLf2==0)||(Rowf2==0)||(n0f2==0)||(Ef2==0)||(poisf2==0)
   axes(handles.axes1)
   semilogx(RTA,TLa,'-.or'); 
   axis tight
   grid on
   set(handles.tabla5,'data',tabla);
   handles.TLa=TLa;
   guidata(hObject,handles);
else

f112=(pi/(4*sqrt(3))*CLf2*H2*(((1/A2)^2)+((1/B2)^2)));%calculo de fmn para la region de funcionamiento I
fc2=((sqrt(3)/pi)*((343)^2)/(CLf2*H2));%calculo de frecuencia critica

%Definicion de frecuencias a trabajar
RTA2=[20;25;31.5;40;50;63;80;100;125;160;200;250;315;400;500;630;800;1000;1250;1600;2000;2500;3150;4000;5000;6000;8000;10000;12500;16000;20000;0];
%Compliancia mecanica del material escogido
Cs2=((768*(1-(poisf2^2)))/((pi^8)*Ef2*(H2^3)*((((1/A2)^2)+((1/B2)^2))^2)));
i2=1;
a2=RTA2(i2);
c2=1;
while (a2<f112)%calculo de TL aleatorio para region I
    ks2(i2)=4*pi*RTA2(i2)*1.18*343*Cs2;
    TLa2(c2,1)=((10*log10(1/(ks2(i2)^2)))-(10*log10(log(1+(1/(ks2(i2)^2))))));
    i2=i2+1;
    c2=c2+1;
    a2=RTA2(i2);   
end

while(a2>f112)&&(a2<fc2)%Calculo de TL aleatorio para la region II
    TLa2(c2,1)=(10*log10(1+(((pi*RTA2(i2)*MS2)/(1.18*343))^2)))-5;
    c2=c2+1;
    i2=i2+1;
    a2=RTA2(i2);
end

while(a2>fc2)&&(a2~=0)
    TLa2(c2,1)=(10*log10((1+((pi*MS2*fc2)/(1.18*343))^2)))+(10*log10(n0f2))+(33.22*log10(RTA2(i2)/fc2))-5.7;
    c2=c2+1;
    i2=i2+1;
    a2=RTA(i2);
end
TLa2(32,1)=0;
%horzcat permite concatenar los vectores tl y freq una vez que tengan el
%mismo tamano para mostrarlo en la uitable
%el comando set permite mostrar los valores en la tabla
tabla2=horzcat(RTA2,TLa2);
set(handles.tabla3,'data',tabla2);
%axes(handles.axes1)
%semilogx(RTA,TLa,'-.or');
%axis tight
%grid on

%Calculo del sistema compuesto de los dos materiales TLa y TLa2
%El material dos siempre estara contenido en el material uno. 

ST=(A*B)+(A2*B2);
S1=(A*B)-(A2*B2);
S2=(A2*B2);

for j=1:31
    t1(j)=(1/(10^(TLa(j)/10)));
    t2(j)=(1/(10^(TLa2(j)/10)));
    TLcomp(j,1)=10*log10(1/(((S1*t1(j))+(S2*t2(j)))/ST));
end
TLcomp(32,1)=0;
handles.TLcomp=TLcomp;
guidata(hObject,handles);
tabla3=horzcat(RTA,TLcomp);
set(handles.tabla5,'data',tabla3);
axes(handles.axes1)
semilogx(RTA,TLcomp,'-.or');
 axis tight
   grid on
guidata(hObject,handles);

end

%set(handles.Prueba,'String',CLf);




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


% --- Executes on selection change in listbox3.
function listbox3_Callback(hObject, eventdata, handles)
inf=get(hObject,'Value');
gos=get(hObject,'String');

switch inf
    case 1%propiedades del Aluminio
        CL=5420;
        ROw=2800;
        n0=0.001;
        E=73.1E9;
        pois=0.33;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 2%Propiedades del Cobre
        CL=3710;
        ROw=8710;
        n0=0.001;
        E=103.4E9;
        pois=0.37;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
        %set(handles.Prueba,'String',CL);
    case 3%Propiedades del Ladrillo
        CL=3800;
        ROw=1800;
        n0=0.015;
        E=25E9;
        pois=0.20;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
        %set(handles.Prueba,'String',CL);
    case 4%Propiedades del Corcho
        CL=675;
        ROw=750;
        n0=0.020;
        E=0.340E9;
        pois=0.08;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 5%Propiedades del Concreto
        CL=2960;
        ROw=2400;
        n0=0.020;
        E=20.7E9;
        pois=0.10;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 6%Propiedades del Vidrio
        CL=5450;
        ROw=2500;
        n0=0.0013;
        E=71E9;
        pois=0.21;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 7%Propiedades del Granito
        CL=4413;
        ROw=2690;
        n0=0.001;
        E=48.3E9;
        pois=0.28;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 8%Propiedades del DryWall
        CL=6790;
        ROw=650;
        n0=0.018;
        E=29.5E9;
        pois=0.13;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 9%Propiedades del Plomo
        CL=1206;
        ROw=11300;
        n0=0.015;
        E=13.8E9;
        pois=0.4;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 10%Propiedades del Lexan
        CL=1450;
        ROw=1200;
        n0=0.015;
        E=2.12E9;
        pois=0.40;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 11%Propiedades del MArmol
        CL=4600;
        ROw=2800;
        n0=0.001;
        E=55.2E9;
        pois=0.26;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 12%Propiedades del Ladrillo de Cemento
        CL=3120;
        ROw=1100;
        n0=0.007;
        E=10.6E9;
        pois=0.1;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 13%Propiedades del Yeso
        CL=4550;
        ROw=1700;
        n0=0.005;
        E=32E9;
        pois=0.3;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 14%Propiedades del Plexiglas
        CL=2035;
        ROw=1150;
        n0=0.020;
        E=4E9;
        pois=0.4;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 15%Propiedades madera aglomerada
        CL=3100;
        ROw=600;
        n0=0.030;
        E=4.86E9;
        pois=0.4;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 16%Propiedads del polietileno
        CL=765;
        ROw=935;
        n0=0.010;
        E=0.48E9;
        pois=0.35;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 17%Propiedades del Pyrex
        CL=5350;
        ROw=2300;
        n0=0.004;
        E=62E9;
        pois=0.24;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 18%propiedaes del caucho de alta densidad
        CL=1700;
        ROw=950;
        n0=0.080;
        E=2.3E9;
        pois=0.4;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 19%Propiedades del acero
        CL=5100;
        ROw=7700;
        n0=0.0013;
        E=200E9;
        pois=0.27;
       handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 20%Propiedades del ocre
        CL=3860;
        ROw=770;
        n0=0.008;
        E=11.2E9;
        pois=0.15;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
    case 21%propiedades del pino
        CL=4680;
        ROw=640;
        n0=0.020;
        E=13.7E9;
        pois=0.15;
        handles.CL2=CL;
        handles.ROw2=ROw;
        handles.n02=n0;
        handles.E2=E;
        handles.pois2=pois;
end
   guidata(hObject,handles); 


% --- Executes during object creation, after setting all properties.
function listbox3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



function a2_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
a=str2double(NewStrVal);
handles.altura2=a;
guidata(hObject,handles);


% --- Executes during object creation, after setting all properties.
function a2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a2 (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 b2_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
b=str2double(NewStrVal);
handles.ancho2=b;
guidata(hObject,handles);


% --- Executes during object creation, after setting all properties.
function b2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to b2 (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 h2_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
h=str2double(NewStrVal);
handles.profundidad2=h;
guidata(hObject,handles);

% --- Executes during object creation, after setting all properties.
function h2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to h2 (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 calcular2.
function calcular2_Callback(hObject, eventdata, handles)
A=handles.altura2;
B=handles.ancho2;
H=handles.profundidad2;
CLf=handles.CL2;
Rowf=handles.ROw2;
n0f=handles.n02;
Ef=handles.E2;
poisf=handles.pois2;
MS=Rowf*H;
handles.MS3=MS;

f11=(pi/(4*sqrt(3))*CLf*H*(((1/A)^2)+((1/B)^2)));%calculo de fmn para la region de funcionamiento I
fc=((sqrt(3)/pi)*((343)^2)/(CLf*H));%calculo de frecuencia critica

%Definicion de frecuencias a trabajar
RTA=[20;25;31.5;40;50;63;80;100;125;160;200;250;315;400;500;630;800;1000;1250;1600;2000;2500;3150;4000;5000;6000;8000;10000;12500;16000;20000;0];
%Compliancia mecanica del material escogido
Cs=((768*(1-(poisf^2)))/((pi^8)*Ef*(H^3)*((((1/A)^2)+((1/B)^2))^2)));
i=1;
a=RTA(i);
c=1;
while (a<f11)%calculo de TL aleatorio para region I
    ks(i)=4*pi*RTA(i)*1.18*343*Cs;
    TLa(c,1)=((10*log10(1/(ks(i)^2)))-(10*log10(log(1+(1/(ks(i)^2))))));
    i=i+1;
    c=c+1;
    a=RTA(i);   
end

while(a>f11)&&(a<fc)%Calculo de TL aleatorio para la region II
    TLa(c,1)=(10*log10(1+(((pi*RTA(i)*MS)/(1.18*343))^2)))-5;
    c=c+1;
    i=i+1;
    a=RTA(i);
end

while(a>fc)&&(a~=0)
    TLa(c,1)=(10*log10((1+((pi*MS*fc)/(1.18*343))^2)))+(10*log10(n0f))+(33.22*log10(RTA(i)/fc))-5.7;
    c=c+1;
    i=i+1;
    a=RTA(i);
end
TLa(32,1)=0;
%horzcat permite concatenar los vectores tl y freq una vez que tengan el
%mismo tamano para mostrarlo en la uitable
%el comando set permite mostrar los valores en la tabla
tabla=horzcat(RTA,TLa);
set(handles.tabla2,'data',tabla);
%axes(handles.axes1)
%semilogx(RTA,TLa,'-.og');
%axis tight


% Definicion y calculo del material 2 de la primera particion
A2=handles.altura4;
B2=handles.ancho4;
H2=handles.profundidad4;
CLf2=handles.CL4;
Rowf2=handles.ROw4;
n0f2=handles.n04;
Ef2=handles.E4;
poisf2=handles.pois4;
MS2=Rowf*H;
handles.MS4=MS2;

if (A2==0)||(B2==0)||(H2==0)||(CLf2==0)||(Rowf2==0)||(n0f2==0)||(Ef2==0)||(poisf2==0)
   axes(handles.axes1)
   semilogx(RTA,TLa,'-.og'); 
   axis tight
   grid on
   set(handles.tabla6,'data',tabla);
   handles.TLa2=TLa;
   guidata(hObject,handles);
else

f112=(pi/(4*sqrt(3))*CLf2*H2*(((1/A2)^2)+((1/B2)^2)));%calculo de fmn para la region de funcionamiento I
fc2=((sqrt(3)/pi)*((343)^2)/(CLf2*H2));%calculo de frecuencia critica

%Definicion de frecuencias a trabajar
RTA2=[20;25;31.5;40;50;63;80;100;125;160;200;250;315;400;500;630;800;1000;1250;1600;2000;2500;3150;4000;5000;6000;8000;10000;12500;16000;20000;0];
%Compliancia mecanica del material escogido
Cs2=((768*(1-(poisf2^2)))/((pi^8)*Ef2*(H2^3)*((((1/A2)^2)+((1/B2)^2))^2)));
i2=1;
a2=RTA2(i2);
c2=1;
while (a2<f112)%calculo de TL aleatorio para region I
    ks2(i2)=4*pi*RTA2(i2)*1.18*343*Cs2;
    TLa2(c2,1)=((10*log10(1/(ks2(i2)^2)))-(10*log10(log(1+(1/(ks2(i2)^2))))));
    i2=i2+1;
    c2=c2+1;
    a2=RTA2(i2);   
end

while(a2>f112)&&(a2<fc2)%Calculo de TL aleatorio para la region II
    TLa2(c2,1)=(10*log10(1+(((pi*RTA2(i2)*MS2)/(1.18*343))^2)))-5;
    c2=c2+1;
    i2=i2+1;
    a2=RTA2(i2);
end

while(a2>fc2)&&(a2~=0)
    TLa2(c2,1)=(10*log10((1+((pi*MS2*fc2)/(1.18*343))^2)))+(10*log10(n0f2))+(33.22*log10(RTA2(i2)/fc2))-5.7;
    c2=c2+1;
    i2=i2+1;
    a2=RTA(i2);
end
TLa2(32,1)=0;
%horzcat permite concatenar los vectores tl y freq una vez que tengan el
%mismo tamano para mostrarlo en la uitable
%el comando set permite mostrar los valores en la tabla
tabla2=horzcat(RTA2,TLa2);
set(handles.tabla4,'data',tabla2);
%axes(handles.axes1)
%semilogx(RTA,TLa,'-.or');
%axis tight
%grid on

%Calculo del sistema compuesto de los dos materiales TLa y TLa2
%El material dos siempre estara contenido en el material uno. 

ST=(A*B)+(A2*B2);
S1=(A*B)-(A2*B2);
S2=(A2*B2);

for j=1:31
    t1(j)=(1/(10^(TLa(j)/10)));
    t2(j)=(1/(10^(TLa2(j)/10)));
    TLcomp(j,1)=10*log10(1/(((S1*t1(j))+(S2*t2(j)))/ST));
end
TLcomp(32,1)=0;

handles.TLcomp2=TLcomp;
tabla3=horzcat(RTA,TLcomp);
set(handles.tabla6,'data',tabla3);
axes(handles.axes1)
semilogx(RTA,TLcomp,'-.og');
guidata(hObject,handles);
 axis tight
   grid on

end




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


% --- Executes on button press in hold1.
function hold1_Callback(hObject, eventdata, handles)
die=get(hObject,'Value');
handles.die=die;
if handles.die==1
hold on
else
hold off
end
guidata(hObject,handles);


% --- Executes on selection change in listbox4.
function listbox4_Callback(hObject, eventdata, handles)
inf=get(hObject,'Value');
gos=get(hObject,'String');

switch inf
    case 1%propiedades del Aluminio
        CL=5420;
        ROw=2800;
        n0=0.001;
        E=73.1E9;
        pois=0.33;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
    case 2%Propiedades del Cobre
        CL=3710;
        ROw=8710;
        n0=0.001;
        E=103.4E9;
        pois=0.37;  
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        %set(handles.Prueba,'String',CL);
    case 3%Propiedades del Ladrillo
        CL=3800;
        ROw=1800;
        n0=0.015;
        E=25E9;
        pois=0.20;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        %set(handles.Prueba,'String',CL);
    case 4%Propiedades del Corcho
        CL=675;
        ROw=750;
        n0=0.020;
        E=0.340E9;
        pois=0.08;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 5%Propiedades del Concreto
        CL=2960;
        ROw=2400;
        n0=0.020;
        E=20.7E9;
        pois=0.10;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 6%Propiedades del Vidrio
        CL=5450;
        ROw=2500;
        n0=0.0013;
        E=71E9;
        pois=0.21;
       handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 7%Propiedades del Granito
        CL=4413;
        ROw=2690;
        n0=0.001;
        E=48.3E9;
        pois=0.28;
       handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 8%Propiedades del DryWall
        CL=6790;
        ROw=650;
        n0=0.018;
        E=29.5E9;
        pois=0.13;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 9%Propiedades del Plomo
        CL=1206;
        ROw=11300;
        n0=0.015;
        E=13.8E9;
        pois=0.4;
       handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 10%Propiedades del Lexan
        CL=1450;
        ROw=1200;
        n0=0.015;
        E=2.12E9;
        pois=0.40;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 11%Propiedades del MArmol
        CL=4600;
        ROw=2800;
        n0=0.001;
        E=55.2E9;
        pois=0.26;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 12%Propiedades del Ladrillo de Cemento
        CL=3120;
        ROw=1100;
        n0=0.007;
        E=10.6E9;
        pois=0.1;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 13%Propiedades del Yeso
        CL=4550;
        ROw=1700;
        n0=0.005;
        E=32E9;
        pois=0.3;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 14%Propiedades del Plexiglas
        CL=2035;
        ROw=1150;
        n0=0.020;
        E=4E9;
        pois=0.4;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 15%Propiedades madera aglomerada
        CL=3100;
        ROw=600;
        n0=0.030;
        E=4.86E9;
        pois=0.4;
       handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 16%Propiedads del polietileno
        CL=765;
        ROw=935;
        n0=0.010;
        E=0.48E9;
        pois=0.35;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 17%Propiedades del Pyrex
        CL=5350;
        ROw=2300;
        n0=0.004;
        E=62E9;
        pois=0.24;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 18%propiedaes del caucho de alta densidad
        CL=1700;
        ROw=950;
        n0=0.080;
        E=2.3E9;
        pois=0.4;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 19%Propiedades del acero
        CL=5100;
        ROw=7700;
        n0=0.0013;
        E=200E9;
        pois=0.27;
       handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 20%Propiedades del ocre
        CL=3860;
        ROw=770;
        n0=0.008;
        E=11.2E9;
        pois=0.15;
        handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
    case 21%propiedades del pino
        CL=4680;
        ROw=640;
        n0=0.020;
        E=13.7E9;
        pois=0.15;
       handles.CL3=CL;
        handles.ROw3=ROw;
        handles.n03=n0;
        handles.E3=E;
        handles.pois3=pois;
        
end
   guidata(hObject,handles); 

% --- Executes during object creation, after setting all properties.
function listbox4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



function a3_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
a=str2double(NewStrVal);
handles.altura3=a;
guidata(hObject,handles);


% --- Executes during object creation, after setting all properties.
function a3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a3 (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 b3_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
b=str2double(NewStrVal);
handles.ancho3=b;
guidata(hObject,handles);

% --- Executes during object creation, after setting all properties.
function b3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to b3 (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 h3_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
h=str2double(NewStrVal);
handles.profundidad3=h;
guidata(hObject,handles);


% --- Executes during object creation, after setting all properties.
function h3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to h3 (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 selection change in listbox5.
function listbox5_Callback(hObject, eventdata, handles)
inf=get(hObject,'Value');
gos=get(hObject,'String');

switch inf
    case 1%propiedades del Aluminio
        CL=5420;
        ROw=2800;
        n0=0.001;
        E=73.1E9;
        pois=0.33;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
    case 2%Propiedades del Cobre
        CL=3710;
        ROw=8710;
        n0=0.001;
        E=103.4E9;
        pois=0.37;  
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        %set(handles.Prueba,'String',CL);
    case 3%Propiedades del Ladrillo
        CL=3800;
        ROw=1800;
        n0=0.015;
        E=25E9;
        pois=0.20;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        %set(handles.Prueba,'String',CL);
    case 4%Propiedades del Corcho
        CL=675;
        ROw=750;
        n0=0.020;
        E=0.340E9;
        pois=0.08;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 5%Propiedades del Concreto
        CL=2960;
        ROw=2400;
        n0=0.020;
        E=20.7E9;
        pois=0.10;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 6%Propiedades del Vidrio
        CL=5450;
        ROw=2500;
        n0=0.0013;
        E=71E9;
        pois=0.21;
       handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
         
    case 7%Propiedades del Granito
        CL=4413;
        ROw=2690;
        n0=0.001;
        E=48.3E9;
        pois=0.28;
       handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
         
    case 8%Propiedades del DryWall
        CL=6790;
        ROw=650;
        n0=0.018;
        E=29.5E9;
        pois=0.13;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 9%Propiedades del Plomo
        CL=1206;
        ROw=11300;
        n0=0.015;
        E=13.8E9;
        pois=0.4;
       handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
         
    case 10%Propiedades del Lexan
        CL=1450;
        ROw=1200;
        n0=0.015;
        E=2.12E9;
        pois=0.40;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 11%Propiedades del MArmol
        CL=4600;
        ROw=2800;
        n0=0.001;
        E=55.2E9;
        pois=0.26;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 12%Propiedades del Ladrillo de Cemento
        CL=3120;
        ROw=1100;
        n0=0.007;
        E=10.6E9;
        pois=0.1;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 13%Propiedades del Yeso
        CL=4550;
        ROw=1700;
        n0=0.005;
        E=32E9;
        pois=0.3;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 14%Propiedades del Plexiglas
        CL=2035;
        ROw=1150;
        n0=0.020;
        E=4E9;
        pois=0.4;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 15%Propiedades madera aglomerada
        CL=3100;
        ROw=600;
        n0=0.030;
        E=4.86E9;
        pois=0.4;
       handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
         
    case 16%Propiedads del polietileno
        CL=765;
        ROw=935;
        n0=0.010;
        E=0.48E9;
        pois=0.35;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 17%Propiedades del Pyrex
        CL=5350;
        ROw=2300;
        n0=0.004;
        E=62E9;
        pois=0.24;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 18%propiedaes del caucho de alta densidad
        CL=1700;
        ROw=950;
        n0=0.080;
        E=2.3E9;
        pois=0.4;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 19%Propiedades del acero
        CL=5100;
        ROw=7700;
        n0=0.0013;
        E=200E9;
        pois=0.27;
       handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
         
    case 20%Propiedades del ocre
        CL=3860;
        ROw=770;
        n0=0.008;
        E=11.2E9;
        pois=0.15;
        handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
        
    case 21%propiedades del pino
        CL=4680;
        ROw=640;
        n0=0.020;
        E=13.7E9;
        pois=0.15;
       handles.CL4=CL;
        handles.ROw4=ROw;
        handles.n04=n0;
        handles.E4=E;
        handles.pois4=pois;
         
end
   guidata(hObject,handles); 


% Hints: contents = cellstr(get(hObject,'String')) returns listbox5 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox5


% --- Executes during object creation, after setting all properties.
function listbox5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



function a4_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
a=str2double(NewStrVal);
handles.altura4=a;
guidata(hObject,handles);

% Hints: get(hObject,'String') returns contents of a4 as text
%        str2double(get(hObject,'String')) returns contents of a4 as a double


% --- Executes during object creation, after setting all properties.
function a4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to a4 (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 b4_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
b=str2double(NewStrVal);
handles.ancho4=b;
guidata(hObject,handles);


% --- Executes during object creation, after setting all properties.
function b4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to b4 (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 h4_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
h=str2double(NewStrVal);
handles.profundidad4=h;
guidata(hObject,handles);
%        str2double(get(hObject,'String')) returns contents of h4 as a double


% --- Executes during object creation, after setting all properties.
function h4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to h4 (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)
NewStrVal=get(hObject,'String');
d=str2double(NewStrVal);
handles.distancia=d;
guidata(hObject,handles);

% Hints: get(hObject,'String') returns contents of d as text
%        str2double(get(hObject,'String')) returns contents of d as a double


% --- Executes during object creation, after setting all properties.
function d_CreateFcn(hObject, eventdata, handles)
% hObject    handle to d (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 ABS_Callback(hObject, eventdata, handles)
NewStrVal=get(hObject,'String');
ABS=str2double(NewStrVal);
handles.ABS=ABS;
guidata(hObject,handles);

% Hints: get(hObject,'String') returns contents of ABS as text
%        str2double(get(hObject,'String')) returns contents of ABS as a double


% --- Executes during object creation, after setting all properties.
function ABS_CreateFcn(hObject, eventdata, handles)
% hObject    handle to ABS (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 Calcular3.
function Calcular3_Callback(hObject, eventdata, handles)
%Lectura de variables de dimensiones de los materiales que componen cada
%particion.
A1=handles.altura;
B1=handles.ancho;
H1=handles.profundidad;
A2=handles.altura3;
B2=handles.ancho3;
H2=handles.profundidad3;
A3=handles.altura2;
B3=handles.ancho2;
H3=handles.profundidad2;
A4=handles.altura4;
B4=handles.ancho4;
H4=handles.profundidad4;
ABS=handles.ABS;
d=handles.distancia;
RTA=[20;25;31.5;40;50;63;80;100;125;160;200;250;315;400;500;630;800;1000;1250;1600;2000;2500;3150;4000;5000;6000;8000;10000;12500;16000;20000;0];

% condicionales para determinar si alguna de las particiones es compuesta
if ((A2==0)||(B2==0)||(H2==0))&&((A4==0)||(B4==0)||(H4==0))%dos particiones sin materiales compuestos
    TL1=handles.TLa;
    TL2=handles.TLa2;
    TLp1=TL1;
    TLp2=TL2;
    MS1=handles.MS1;
    MS2=0;
    MS3=handles.MS3;
    MS4=0;
  
elseif ((A2~=0)||(B2~=0)||(H2~=0))&&((A4~=0)||(B4~=0)||(H4~=0))%Ambas particiones c materiales compuestos
    TLcomp1=handles.TLcomp;
    TLcomp2=handles.TLcomp2;
    TLp1=TLcomp1;
    TLp2=TLcomp2;
    MS1=handles.MS1;
    MS2=handles.MS2;
    MS3=handles.MS3;
    MS4=handles.MS4;
elseif ((A2~=0)||(B2~=0)||(H2~=0))&&((A4==0)||(B4==0)||(H4==0))%particion 1 con material compuesto y particion 2 sin
    TL2=handles.TLa2;
    TLcomp1=handles.TLcomp;
    TLp1=TLcomp1;
    TLp2=TL2;
    MS1=handles.MS1;
    MS2=handles.MS2;
    MS3=handles.MS3;
    MS4=0;
elseif ((A2==0)||(B2==0)||(H2==0))&&((A4~=0)||(B4~=0)||(H4~=0))%particion 2 con material compuesto y particion 1 sin
    TL1=handles.TLa;
    TLcomp2=handles.TLcomp2;
    TLp1=TL1;
    TLp2=TLcomp2;
    MS1=handles.MS1;
    MS2=0;
    MS3=handles.MS3;
    MS4=handles.MS4;
end

ST1=(A1*B1)+(A2*B2);%superficie total primera particion
SM1=(A1*B1);
SM2=(A2*B2);
X1=(SM1*100)/ST1;
Y1=(SM2*100)/ST1;
MSA=((X1*MS1)+(Y1*MS2))/100;


ST2=(A3*B3)+(A4*B4);%superficie total segunda particion
SM3=(A3*B3);
SM4=(A4*B4);
X2=(SM3*100)/ST2;
Y2=(SM4*100)/ST2;
MSB=((X2*MS3)+(Y2*MS4))/100;

f1=((1.18*343)/(pi*(MSA+MSB)));%limite inferior de la primera region doble
f0=((343/(2*pi))*(((1.18/d)*((1/MSA)+(1/MSB)))^0.5));
fa=343/(2*pi*d);
z=1;
j=1;
q=RTA(j);
while (f1<q)&&(q<f0)%calculo de TL aleatorio de particion doble para region I
    TLdoble(z,1)=(20*log10(MSA+MSB))+(20*log10(RTA(j)))-47.3;
    j=j+1;
    z=z+1;
    q=RTA(j);   
end



while (f0<q)&&(q<fa)%calculo de TL aleatorio de particion doble para region II

    TLdoble(z,1)=(TLp1(j)+TLp2(j)+(20*log10((4*pi*RTA(j)*d)/343)));
    j=j+1;
    z=z+1;
    q=RTA(j);   
end


while (q>fa)&&(q~=0)%calculo de TL aleatorio de particion doble para region III
    
    TLdoble(z,1)=(TLp1(j)+TLp2(j)+(10*log10(4/(1+(2/ABS)))));
    j=j+1;
    z=z+1;
    q=RTA(j);   
end
TLdoble(32,1)=0;
tabla=horzcat(RTA,TLdoble);
set(handles.tabla7,'data',tabla);
axes(handles.axes1)
semilogx(RTA,TLdoble,'-.xk');
guidata(hObject,handles);
axis tight
grid on


% --- Executes on scroll wheel click while the figure is in focus.
function figure1_WindowScrollWheelFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% eventdata  structure with the following fields (see FIGURE)
%	VerticalScrollCount: signed integer indicating direction and number of clicks
%	VerticalScrollAmount: number of lines scrolled for each click
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on selection change in listbox2.
function listbox6_Callback(hObject, eventdata, handles)
% hObject    handle to listbox2 (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 listbox2 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox2


% --- Executes during object creation, after setting all properties.
function listbox6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



function edit16_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 edit16_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 edit17_Callback(hObject, eventdata, handles)
% hObject    handle to b (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of b as text
%        str2double(get(hObject,'String')) returns contents of b as a double


% --- Executes during object creation, after setting all properties.
function edit17_CreateFcn(hObject, eventdata, handles)
% hObject    handle to b (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



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


% --- Executes during object creation, after setting all properties.
function edit18_CreateFcn(hObject, eventdata, handles)
% hObject    handle to h (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 Calcular1.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject    handle to Calcular1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on selection change in listbox3.
function listbox7_Callback(hObject, eventdata, handles)
% hObject    handle to listbox3 (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 listbox3 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox3


% --- Executes during object creation, after setting all properties.
function listbox7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



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


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


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


% --- Executes during object creation, after setting all properties.
function edit21_CreateFcn(hObject, eventdata, handles)
% hObject    handle to h2 (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 calcular2.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject    handle to calcular2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


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

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


% --- Executes on selection change in listbox4.
function listbox8_Callback(hObject, eventdata, handles)
% hObject    handle to listbox4 (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 listbox4 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox4


% --- Executes during object creation, after setting all properties.
function listbox8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



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


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


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


% --- Executes during object creation, after setting all properties.
function edit24_CreateFcn(hObject, eventdata, handles)
% hObject    handle to h3 (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 selection change in listbox5.
function listbox9_Callback(hObject, eventdata, handles)
% hObject    handle to listbox5 (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 listbox5 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from listbox5


% --- Executes during object creation, after setting all properties.
function listbox9_CreateFcn(hObject, eventdata, handles)
% hObject    handle to listbox5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

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



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


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


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


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


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


% --- Executes during object creation, after setting all properties.
function edit29_CreateFcn(hObject, eventdata, handles)
% hObject    handle to ABS (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 Calcular3.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject    handle to Calcular3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

Contact us