clc clear %input dimensions b=input(\'insert B1 in in:\'); t=input(\'insert t1 i
ID: 1714634 • Letter: C
Question
clc
clear
%input dimensions
b=input('insert B1 in in:');
t=input('insert t1 in in:');
B=input('insert B2 in in:');
T=input('insert t2 in in:');
K=input('insert t3 in in:');
h=input('insert H in ft:');
stress=input('insert stress in ksi:');
n=input('insert number of spans:');
%loop for length of each span
%loop code here
%until i==n input length of span
% insert length
%i=i+1
%does i==n
%if no, insert next length
%if yes, end loop
%solve for area
area=(b*T)+t*(h-T-K)+(K*B);
%solve for y centroid
y=(K*B*K/2)+t*(h-b-B)*(K+(h-b-B)/2)+T*b*(h-T/2);
y=y/area;
%solve for I
%if B2>B1
I=B*h^3/12-2*(B/2-t/2)*((h-K-T)^3)/12-(B-b)*(T^3)/12
%if B1>B2
I=b*h^3/12-2*(b/2-t/2)/12*(h-K-T)^3-(b-B)/12*(K)^3
%solve for section modulus s=I/y
%solve for mp mp=s*stress
% solve for end collapse loads
%solve for collapse loads of inner spans
%display results
EXAMPLE
Input: Section dimensions Number of spans Length of each span Output: Collapse load L1 2 Ln B1 t2 t3 B2Explanation / Answer
SAVE THE CODE IN MATLAB AND GET THE RESUTLS-
clc
clear
close all;
b=input('Insert B1 in in:');
t=input('Insert t1 in in:');
B=input('Insert B2 in in:');
T=input('Insert t2 in in:');
K=input('Insert t3 in in:');
h=input('Insert H in ft:');
Stress=input('Insert stress in in:');
area=(b*T)+t*(h-T-K)+(K*b);
% Solve for y Centroid
y=(K*B*K/2)+t*(h-b-B)*(K+(h-b-B)/2)+T*b*(h-T/2);
if B>b
I=(B*h^3/12)-(2*(B/2-t/2)^3)/(12-(B-b)+(T)^3/12);
else
I=(b*h^3/12)-(2*(b/2-t/2)^3)/(12*(h-K-T)^3-(b-B)/12*(K)^3);
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.