Documentos de Académico
Documentos de Profesional
Documentos de Cultura
S');
fprintf ('\n\t\t\t PROGRAMA PARA LA SOLUCI�N DE VIGAS POR EL M�TODO PENDIENTE
DEFLEXI�N');
fprintf ('\n\n\t\t VIGA CON VOLADIZO A LA DERECHA= 1');
fprintf ('\n\t\t VIGA CON VOLADIZO A LA IZQUIERDA= 2');
fprintf ('\n\t\t VIGA SIN VOLADIZO = 3');
fprintf ('\n\t\t VIGA CON VOLADIZO EN AMBOS LADOS= 4 \n\n');
fprintf ('INGRESE EL TIPO DE CONFIGURACI�N:');
Conf=input('');
fprintf('INGRESE EL N�MERO DE ELEMENTOS:');
NE= input('');%NE=n�mero de elmentos
fprintf('INGRESE EL M�DULO DE ELASTICIDAD [T/m^2]:');
E = input('');
if Conf==1 || Conf==2
ND=NE;%ND=cantidad de apoyos
fprintf ('\n');
fprintf('SI HAY EMPOTRAMIENTO PONGA 1, SINO PONGA 0:');
EMP=input('');%EMP para poder configurar la viga en un true-false
elseif Conf==3
ND=NE+1;
fprintf ('\n\t\t EMPOTRAMIENTO EN AMBOS EXTREMOS=1');
fprintf ('\n\t\t EMPOTRAMIENTO EN EL EXTREMO IZQUIERDO=2');
fprintf ('\n\t\t SIN EMPOTRAMIENTO=3');
fprintf ('\n\t\t EMPOTRAMIENTO EN EL EXTREMO DERECHO=4 \n');
fprintf ('\n INGRESE EL CASO DE EMPOTRAMIENTO:');
EMP=input('');
elseif Conf==4
ND=NE-1;
endif
for i=1:NE
fprintf ('\n\n ELEMENTO %d: ',i);
fprintf ('\n\n INGRESE LA LONGITUD DEL ELEMENTO [m]: ');
L(i)=input ('');
MD=zeros(NE,1);
MI=zeros(NE,1);
M=zeros (NE+1,1);
for i=1: NE
fprintf ('\n\n ELEMENTO %d: ',i);
fprintf ('\n\n �EL ELEMENTO TIENE CARGAS? SI NO TIENE COLOCAR CERO. SI TIENE,
�C�ANTAS?:');
C=input('');%n�mero de cargas
MPI=0;%momento perfecto por izquierda
MPD=0;
for j=1:C
fprintf ('\n\t\t\t CARGA PUNTUAL EN CUALQUIER PUNTO= 1');
fprintf ('\n\t\t\t CARGA PUNTUAL EN EL CENTRO= 2');
fprintf ('\n\t\t\t CARGA UNIFORMEMENTE DISTRIBUIDA = 3');
fprintf ('\n\t\t\t CARGA PARCIALMENTE DISTRIBUIDA= 4');
%fprintf ('\n\t\t\t CARGA TRIANGULAR UNIFORME ASCENDENTE= 5');
fprintf ('\n\n\t CARGA %d: ', j);
fprintf ('\n\n\t INGRESE EL TIPO DE CARGA:');
TC=input (''); %TC: tipo de carga
if TC==1
fprintf ('\t INGRESE LA CARGA [T]: ');
P=input ('' );
fprintf ('\t INGRESE LA DISTANCIA AL APOYO IZQUIERDO [m]: ');
a=input ('');
M1= ((P*a)*(L(i)-a).^2)./(L(i).^2);
M11=-((P*(a.^2)*(L(i)-a))./(L(i).^2));
MPI=MPI+M1;
MPD=MPD+M11;
elseif TC==2
fprintf ('\t INGRESE LA CARGA [T]: ');
P=input ('' );
M2=1*P*L(i)./8;
M22=-M2;
MPI=MPI+M2;
MPD=MPD+M22;
elseif TC==3
fprintf ('\t INGRESE LA CARGA [T]: ');
P=input ('' );
M3=P*L(i).^2./12;
M33=-M3;
MPI=MPI+M3;
MPD=MPD+M33;
elseif TC==4
fprintf ('\n\t\t\t DISTRIBUCI�N DESDE EL APOYO IZQUIERDO EN LA HASTA UN PUNTO
= 1');
fprintf ('\n\t\t\t DISTRIBUCI�N ENTRE APOYOS CON b EQUIDISTANTE A LOS MISMOS=
2');
fprintf ('\n\t\t\t DOBLE DISTRIBUCI�N A UNA MISMA DISTANCIA DE LOS APOYOS=
3 \n');
fprintf ('\n\t INGRESE EL TIPO DE DISTRIBUCI�N: ');
DV= input ('');%DV=CASO DE DISTRIBUCI�N EN LA VIGA
if DV==1
fprintf ('\t INGRESE LA CARGA [T]: ');
P=input ('' );
fprintf ('\t INGRESE LA DISTANCIA AL APOYO IZQUIERDO[m]:');
a=input('');
M4_1=(P*a.^2./12)*(6-(8*a/L(i))+(3*a.^2/(L(i).^2)));
M44_1=-(P*a.^2./12)*((4*a/L(i))-(3*a.^2/(L(i).^2)));
MPI=MPI+ M4_1;
MPD=MPD+M44_1;
elseif DV==2
fprintf ('\t INGRESE LA CARGA [T]: ');
P=input ('' );
fprintf ('INGRESE LA DISTANCIA DEL INICIO DE LA DISTRIBUIDA AL APOYO
IZQUIERDO[m]: ');
b=input('');
M4_2=((P*L(i)(L(i)-(2*b)))./24)(3-(((L(i)-(2*b)).^2)./((L(i).^2))));
M44_2=-M4_2;
MPI=MPI+M4_2;
MPD=MPD+M44_2;
elseif DV==3
fprintf ('\t INGRESE LA CARGA [T]: ');
P=input ('' );
fprintf ('\t INGRESE LA DISTANCIA AL APOYO IZQUIERDO[m]: ');
a=input('');
M4_3=(P*a.^2/6)*(3-(2*a./L(i)));
M44_3=-M4_3;
MPI=MPI+M4_3;
MPD=MPD+M44_3;
endif
endif
endfor
%V1(i)=M1(i,1)=MPI
%V2(i+NE)=M2(i,2)=MPD
MD(i,1)=MPD;
MI(i,1)=MPI;
MI
MD
end
for i=2:NE
M(i,1)= MI(i-1,1)+MD(i,1);
endfor
M(NE+1,1)=MD(NE,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%matriz teta%%%%%%%%%%%%%
for i=1:NE
endfor
V=zeros(1,1+NE);
V(1)=2*X(1);
V(size(V))=2*X(size(X));
for i=2:1:length(V)-1
V(i)= (X(i-1)+X(i))*2;
endfor
D=diag(V);
W=diag(X,1);
Y=diag(X,-1);
Mainc=W+D+Y;
if Conf==2
if EMP==1
Mainc (ND,ND)=0;
endif
endif
if Conf==3
if EMP==1
Mainc (1,1)=0 ;
Mainc (ND,ND)=0;
endif
if EMP==2
Mainc (1,1)=0 ;
endif
if EMP==4
Mainc (ND,ND)=0;
endif
endif
Maincinv=Mainc^-1;
Matrixtotal=Maincinv*M;
MatMom=(Matrixtotal.*Mainc)+M;
Matrixtotal=Matrixtotal*(1/10)
MBA=(2*Matrixtotal(1,1))+(4*Matrixtotal(2,1))+(M(1,1))
MBC=(4*Matrixtotal(2,1))+(2*Matrixtotal(3,1))+(M(2,1))
MCB=(2*Matrixtotal(2,1))+(4*Matrixtotal(3,1))+(M(3,1))
MCD=(4*Matrixtotal(3,1))+(2*Matrixtotal(4,1))+(M(4,1))