UNIVERSIDAD NACIONAL DE SAN CRISTÓBAL DE HUAMANGA ESCUELA DE FORMACIÓN PROFESIONAL DE INGENIERÍA INGENIERÍ A CIVIL
PROGRAMACIÓN DIGITAL (IC-246) TEMA ANÁLISIS ESTRUCTURAL DE VIGAS ALUMNO: CÁRDENAS MENDOZA !"#$% E&'&* CÓDIGO: +6++,6,
A
.1.
OBJETIVO
P"."%/ P"."%/ "% 01. '"%"3". '"%"3". 3'%. &" 3. 51.$3". 53$77$1%". 53$77$1%". 8" 5"&" /"%" MATLAB "% 3 I%'"%$"9 E./7/3* M1/$# 3 "./&$%/" 3 .1 &" MATLAB "% 3 .137$% &" "./7/. 7$#$3".*
A
.2.
APLICACIÓN
E./" /9731 &" MATLAB 1$"%/&1 "./&$%/". &" $%'"%$"9 7$#$3 8" ;<% /"$%&1 "3 7$731 &" 7.1. =.$71. "% "./=/$7 < ".$./"%7$ &" /"$3".* L1. /". 515"./1. 8" 71%01% 71%01% 3 ." &"3 71%>%/1 71%>%/1 &" ;"$"%/. ;"$"%/. %"7".$. %"7".$. 5 %3$? %3$? "./7/. "./7/. 7$#$3".* S" &"%1$% #$' % "3""%/1 71%./7/$#1 3$%"3 8" /> 5$%7$53"%/" 03"@$%* E% 03"@$%* E% 3. #$'. 3 31%'$/& 5"&1$% .1" 3. 1/. &1. &$"%.$1%". < ."3" ." ;1$?1%/3* E3 ".0 ".0" "?1 ?1 &" 03"@ 03"@$ $%% 51# 51#17 17 /"%.$1%". &" /77$% < 715".$% 51&7$%&1." 51&7$%&1." 3. =@$. "% "3 71&% $%0"$1 < "% "3 71&% .5"$1 ".5"7/$#"%/" 3. 73". ." 7373% "37$1%%&1 "3 1"%/1 03"7/1 < < "3 ."'%&1 1"%/1 &" $%"7$* E% $%"7$* E% 3. ?1%. 7"7%. 31. 51<1. ." 51&7"% ".0"?1. 71/%/". 1 71/%/". 1 5%?1%$"%/1* T$% 5"&"% 51&7$." /"%.$1%". 51 /1.$% .1" /1.$% .1" /1&1 "% 3. #$'. 8" 01% "3 5"9"/1 "@/"$1 1
&" % 01>&1* E./7/3"%/" "3 7151/$"%/1 &" % #$' ." "./&$ "&$%/" % 1&"31 &" 5$.*
A.2.1. Datos Requeridos L1. '"%/1. %"7".$1. 5 3 53$77$% &" 7$1 &" %$&&". .1%:
U% %"1 "3 8" "5"."%/ 3 '%$/& &"."&* U% %$&& &" "&$& "% "./" 7.1 %"/1% (N) A.2.2. Resultados L. %/"$1". 53$77$1%". %1 .1% 3. %$7. "@$./"%/".* 3 #"./$3$&& &" MATLAB 5"$/" 53$77$1%". /% .$53". 711 3 .137$% &" % ."%7$33 "77$% %1 3$%"3 ;./ 1&"37$1%". &" 7153">1. .$./". "./7/3".* A%/". 8" 8"" #13#"." % "@5"/1 "% "3 %">1 &" % 51' "% ".5"7$3 ".3/ =. $51/%/" 715"%&" 31. 0%&"%/1. < 5$%7$5$1. 09.$71. &" 3 /"19 "./7/3* O/"%"1.: L. "77$1%". &" 3 #$'* L 0"? 71/%/" < "3 1"%/1 03"7/1 • •
A
..
PROCEDI!IENTO
E3 517"&$$"%/1 ."'$ ".: +* 2* * 4* *
C" 3 53$77$% &".&" "3 "%/1%1 &" &".1331 $%/"'&1 &" MATLAB* D$." 3 #"%/% 5$%7$53 &" 3 53$77$% /$3$?%&1 31. 71%/13". %"7".$1.* A.$'% 7&$'1. 31. "#"%/1. &" 31. 71%/13". /$3$?&1.* D"73 3. #$3". %$#"3 &" 0%7$1%". < 711 #$3". '313".* I53""%/ 3 53$77$% 71% "3 .1 &" 3. $%./77$1%". &" &"7$.$%*
A..1. Dia"ra#a de $lu%o E3 &$' &" 03>1 "./= "5"."%/&1 51 3 .$'$"%/" 0$'
2
3
A
.&.
VENTANA PRINCIPAL DE LA APLICACIÓN
4
A
.'.
CÓDI(O )UENTE
function varargout = viga(varargin) % VIGA MATLAB code for viga.fig % VIGA, by itsef, creates a ne! VIGA or raises t"e e#isting % singeton$. % % = VIGA returns t"e "ande to a ne! VIGA or t"e "ande to % t"e e#isting singeton$. % % VIGA(&'ALLBA'&,"b*ect,event+ata,"andes,...) cas t"e oca % function naed 'ALLBA' in VIGA.te#t- !it" t"e given inut arguents. % % VIGA(&/roerty&,&Vaue&,...) creates a ne! VIGA or raises t"e % e#isting singeton$. 0tarting fro t"e eft, roerty vaue airs are % aied to t"e G1I before viga-ening2cn gets caed. An % unrecogni3ed roerty nae or invaid vaue a4es roerty aication % sto. A inuts are assed to viga-ening2cn via varargin. % % $0ee G1I tions on G1I+5&s Toos enu. '"oose 6G1I ao!s ony one % instance to run (singeton)6. % % 0ee aso7 G1I+5, G1I+ATA, G1IA8+L50 % 5dit t"e above te#t to odify t"e resonse to "e viga % Last Modified by G1I+5 v9.: 9; ;;7>?7;; % Begin initiai3ation code < + 8T 5+IT gui-0ingeton = @ gui-0tate = struct(&gui-8ae&, fienae, ... &gui-0ingeton& , gui-0ingeton, ... &gui-ening2cn& , viga-ening2cn, ... &gui-utut2cn& , viga-utut2cn, ... &gui-Layout2cn& , C , ... &gui-'abac4&, C)@ if nargin DD isc"ar(vararginEF) gui-0tate.gui-'abac4 = str9func(vararginEF)@ end if nargout varargoutE7nargoutFC = gui-ainfcn(gui-0tate, vararginE7F)@ ese gui-ainfcn(gui-0tate, vararginE7F)@ end % 5nd initiai3ation code < + 8T 5+IT
% <<< 5#ecutes *ust before viga is ade visibe.
5
function viga-ening2cn("b*ect, eventdata, "andes, varargin) %'entrar a G1I ovegui("b*ect, ¢er&) 3=iread(&esuea.*g&)@ iage(3) a#is off % T"is function "as no outut args, see utut2cn. % "b*ect "ande to figure % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % varargin coand ine arguents to viga (see VAHAHGI8) % '"oose defaut coand ine outut for viga "andes.outut = "b*ect@ % 1date "andes structure guidata("b*ect, "andes)@ % 1IAIT a4es viga !ait for user resonse (see 1IH501M5) % ui!ait("andes.figure)@
% <<< ututs fro t"is function are returned to t"e coand ine. function varargout = viga-utut2cn("b*ect, eventdata, "andes) % varargout ce array for returning outut args (see VAHAHG1T)@ % "b*ect "ande to figure % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % Get defaut coand ine outut fro "andes structure varargoutEF = "andes.outut@
function ra-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to ra (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of ra as te#t % str9doube(get("b*ect,&0tring&)) returns contents of ra as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function ra-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to ra (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H.
6
if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
function rb-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to rb (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of rb as te#t % str9doube(get("b*ect,&0tring&)) returns contents of rb as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function rb-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to rb (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
function -'abac4("b*ect, eventdata, "andes) % "b*ect "ande to (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of as te#t % str9doube(get("b*ect,&0tring&)) returns contents of as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function -'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@
7
end
function a-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to a (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of a as te#t % str9doube(get("b*ect,&0tring&)) returns contents of a as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function a-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to a (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
function b-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to b (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of b as te#t % str9doube(get("b*ect,&0tring&)) returns contents of b as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function b-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to b (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
8
function !-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to ! (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of ! as te#t % str9doube(get("b*ect,&0tring&)) returns contents of ! as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function !-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to ! (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
function a-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to a (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of a as te#t % str9doube(get("b*ect,&0tring&)) returns contents of a as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function a-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to a (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
function b-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to b (see G'B)
9
% eventdata % "andes
reserved < to be defined in a future version of MATLAB structure !it" "andes and user data (see G1I+ATA)
% ints7 get("b*ect,&0tring&) returns contents of b as te#t % str9doube(get("b*ect,&0tring&)) returns contents of b as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function b-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to b (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
function dL-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to dL (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of dL as te#t % str9doube(get("b*ect,&0tring&)) returns contents of dL as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function dL-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to dL (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
% <<< 5#ecutes on button ress in cacuar. function cacuar-'abac4("b*ect, eventdata, "andes) %+atos de os edit
10
! =str9doube(get("andes.!, &0tring&))@ a =str9doube(get("andes.a, &0tring&))@ b =str9doube(get("andes.b, &0tring&))@ dL =str9doube(get("andes.dL, &0tring&))@ %verificaciJn de as cedas de entrada if isety(L)Kisnan(L) sgbo#(&5 aretro est vaco o no es un vaor nuNrico& ) return end if isety(Ma)Kisnan(Ma) sgbo#(&5 aretro est vaco o no es un vaor nuNrico& ) return end if isety(Mb)Kisnan(Mb) sgbo#(&5 aretro est vaco o no es un vaor nuNrico& ) return end if isety(!)Kisnan(!) sgbo#(&e aretro est vaco o no es un vaor nuNrico& ) return end if isety(a)Kisnan(a) sgbo#(&5 aretro est vaco o no es un vaor nuNrico& ) return end if isety(L)Kisnan(L) sgbo#(&e aretro est vaco o no es un vaor nuNrico& ) return end if isety(b)Kisnan(b) sgbo#(&5 aretro est vaco o no es un vaor nuNrico& ) return end if isety(dL)Kisnan(dL) sgbo#(&5 aretro est vaco o no es un vaor nuNrico& ) return end % 'cuo de Ha y Hb Hb=(OL)$(Ma
11
#=dL$i@ R=R #C@ if #S=a sta=@ ese sta=;@ end if #S=b stb=@ ese stb=;@ end V(iP)=Ha
end % 0aida de resutados set("andes.V,&0tring&,V(iP))@ set("andes.M,&0tring&,M(iP))@
% "b*ect % eventdata % "andes
"ande to cacuar (see G'B) reserved < to be defined in a future version of MATLAB structure !it" "andes and user data (see G1I+ATA)
function M-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to te#t- (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes structure !it" "andes and user data (see G1I+ATA) % ints7 get("b*ect,&0tring&) returns contents of te#t- as te#t % str9doube(get("b*ect,&0tring&)) returns contents of te#t- as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function te#t--'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to te#t- (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
function V-'abac4("b*ect, eventdata, "andes) % "b*ect "ande to te#-v (see G'B)
12
% eventdata % "andes
reserved < to be defined in a future version of MATLAB structure !it" "andes and user data (see G1I+ATA)
% ints7 get("b*ect,&0tring&) returns contents of te#-v as te#t % str9doube(get("b*ect,&0tring&)) returns contents of te#-v as a doube
% <<< 5#ecutes during ob*ect creation, after setting a roerties. function te#-v-'reate2cn("b*ect, eventdata, "andes) % "b*ect "ande to te#-v (see G'B) % eventdata reserved < to be defined in a future version of MATLAB % "andes ety < "andes not created unti after a 'reate2cns caed % int7 edit contros usuay "ave a !"ite bac4ground on indo!s. % 0ee I0/' and 'M/1T5H. if isc DD iseua(get("b*ect, &Bac4ground'oor& ), get(;,&defaut1icontroBac4ground'oor& )) set("b*ect,&Bac4ground'oor& ,&!"ite&)@ end
A
.*.
BIBLIO(RA)+A
;//5:".*.7$&*71&17++4,,M/3-"%-E3-A%3$.$.-E./7/3 •
http://www.fundibeq.org/opencms/eport/sites/def!u"t/#$%/down"o!ds/g! ""er&/methodo"og&/too"s/di!gr!m!'de'(u)o.pdf http://b"ogs.technet.com/b/ms*isio2010/!rchi*e/2010/11/22/p"!nti""!s+ de+di!gr!m!+de+(u)o+en+*isio+2010.!sp http://mis+!"goritmos.com/!prend!+!+cre!r+di!gr!m!s+de+(u)o
13