Utilization of MATLAB in Structural Analysis
Utilization of MATLAB in Structural Analysis
'
'
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
]
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0 0 0 / 0 0 0 0 / 3 0 0 0 1 0 / 3 0
0 0 0 / 0 0 0 0 / 0 0 0 0 0 / 0
0 0 0 / / 0 0 0 0 1 0 0 0 0 0 0
0 0 0 / / 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 / / 0 1 0 0 / 0 0 0 0 0
0 0 0 0 / / 0 0 0 0 / 0 0 0 0 0
1 0 0 0 0 / 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 / 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 / 3 1 / 0 0 0 0 0
0 0 0 0 0 0 0 0 / 0 / 1 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
0 0 1 0 0 0 0 0 0 0 0 0 0 0 / 3 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 / 1
p
q
r
E
E
A
F
F
F
F
F
F
F
F
F
F
F
F
F
c b d b d b
c a d a d a
c b c b
c a c a
c b c b c b
c a c a c a
c b
c a
d b c b
d a c a
d b
d a
y
x
y
GH
FG
EF
DE
DF
CH
CG
CF
CD
BH
BC
AH
AB
(3)
Method of Sections:
The method of sections for analyzing a truss is normally utilized in situations where only the
forces in specific members are to be computed. In the given truss, to determine the forces in
members BC, CH, and GH using this method, these members are cut and two force equilibrium
equations and one moment equilibrium equation are written for the section of the truss as shown
in Figure 3. The three equations can be arranged in the matrix form as shown in Eq. (4), and the
MATLAB solution for the unknowns in the problem can be obtained using the left-division
operation as done in the previous method. Note that prior to determining the unknown member
forces F
BC
, F
CH
, and F
GH
in Eq. (4), it is necessary to compute the reaction A
y
at support A using
the equilibrium of the entire truss. The expression for A
y
is provided in Eq. 5. The script file for
this problem and the corresponding results for the data already presented are provided in Figure 5.
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
% Analysis of a Truss Utilizing the Method of Joints
% ____________________________________________________________________________________________
% Program objective:
% To compute the member forces and support reactions of the given truss utilizing
% the method of joints.
% ____________________________________________________________________________________________
% Data acquisition:
p=input('Enter the value of force p(kip):\n');
q=input('Enter the value of force q(kip):\n');
r=input('Enter the value of force r(kip):\n');
a=input('Enter the value for the dimension a(ft):\n');
b=input('Enter the value for the dimension b(ft):\n');
% ____________________________________________________________________________________________
% Computation of the truss member forces and support reactions:
c=sqrt(a^2+b^2);
d=sqrt(a^2+9*b^2);
A(1,:)=[1,a/d,zeros(1,14)];
A(2,:)=[0,3*b/d,zeros(1,11),1,zeros(1,2)];
A(3,:)=[-1,0,1,zeros(1,13)];
A(4,:)=[zeros(1,3),1,zeros(1,12)];
A(5,:)=[zeros(1,2),-1,0,1,a/c,0,-a/d,zeros(1,8)];
A(6,:)=[zeros(1,5),b/c,1,3*b/d,zeros(1,8)];
A(7,:)=[zeros(1,4),-1,zeros(1,4),1,zeros(1,6)];
A(8,:)=[zeros(1,8),1,zeros(1,7)];
A(9,:)=[zeros(1,9),-1,-a/c,zeros(1,3),-1,0];
A(10,:)=[zeros(1,10),b/c,zeros(1,4),1];
A(11,:)=[zeros(1,5),-a/c,zeros(1,4),a/c,-a/c,zeros(1,4)];
A(12,:)=[zeros(1,5),-b/c,zeros(1,2),-1,0,-b/c,b/c,zeros(1,4)];
A(13,:)=[zeros(1,11),a/c,-a/c,zeros(1,3)];
A(14,:)=[zeros(1,6),-1,zeros(1,4),-b/c,b/c,zeros(1,3)];
A(15,:)=[0,-a/d,zeros(1,5),a/d,zeros(1,4),a/c,zeros(1,3)];
A(16,:)=[0,-3*b/d,0,-1,zeros(1,3),-3*b/d,zeros(1,4),-b/c,zeros(1,3)];
B=[zeros(11,1);r;0;q;-p;0];
X=A\B;
% ____________________________________________________________________________________________
% Outputing the member forces and support reactions:
fprintf('Member Forces(kip):\n\n')
fprintf('AB = %5.3f AH = %5.3f BC = %5.3f BH = %5.3f CD = %5.3f CF = %5.3f CG = %5.3f\n\n',...
X(1),X(2),X(3),X(4),X(5),X(6),X(7))
fprintf('CH = %5.3f DF = %5.3f DE = %5.3f EF= %5.3f FG = %5.3f GH = %5.3f\n\n',...
X(8),X(9),X(10),X(11),X(12),X(13))
fprintf('Support Reactions(kip):\n\n')
fprintf('Ay = %5.3f Ex = %5.3f Ey = %5.3f\n',X(14),X(15),X(16))
Output:
Member Forces(kip):
AB = 1.375 AH = -2.148 BC = 1.375 BH = 0.000 CD = 8.875 CF = -4.039 CG = -3.000
CH = 5.858 DF = 0.000 DE = 8.875 EF= -11.713 FG = -7.674 GH = -7.674
Support Reactions(kip):
Ay = 1.650 Ex = 2.000 Ey = 4.350
Figure 2. The MATLAB Script File and a Sample Output for the
Analysis of a Truss Using the Method of Joints
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
Figure 3. Free Body Diagram of the Left Section of the Truss
'
'
1
1
1
]
1
pb a
y
A
Ay
p
GH
CH
BC
F
F
F
c ab d ab
c b d b
c a d a
3
/ 3 / 3 0
/ / 3 0
/ / 1
(4)
a
pb qa ra
A
y
4
3 2 +
. (5)
III. Analysis of Statically Determinate Beams
The procedure for obtaining the shear and moment diagrams and plotting the variation of slope
and deflection along the length of the beam is described through the solution of a sample beam
and loading condition shown in Figure 4. Prior to developing the MATLAB script file for this
problem, the following preliminary task involving the determination of the algebraic expressions
for the shear, moment, slope, and deflection needs to be performed.
Figure 4. Free Body Diagrams for the Beam
a
A B
H
p
3b
FCH
Ay
FGH
F
BC
L
a
X2 x1
A B
RA
RB
RA
M1 M2
x
1
a-x2
V1
V2
(a)
(c) (b)
w
C
C
w
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
% Analysis of a Truss Utilizing the Method of Sections.
% ______________________________________________________________________________________________
% Program objective:
% To compute the forces in members BC, CH, and GH of the given truss utilizing the method
% of sections.
% ______________________________________________________________________________________________
% Data acquisition:
p=input('Enter the value of force p(kip):\n');
q=input('Enter the value of force q(kip):\n');
r=input('Enter the value of force r(kip):\n');
a=input('Enter the value for the dimension a(ft):\n');
b=input('Enter the value for the dimension b(ft):\n');
% ______________________________________________________________________________________________
% Computation of the support reaction at A:
Ay=(r*a+2*q*a-3*p*b)/(4*a)
% ______________________________________________________________________________________________
% Computation of the truss member forces:
c=sqrt(a^2+b^2);
d=sqrt(a^2+9*b^2);
A(1,:)=[1,a/d,a/c];
A(2,:)=[0,-3*b/d,-b/c];
A(3,:)=[0,-3*a*b/d,-3*a*b/c];
B=[-p;-Ay;Ay*a+3*p*b];
F=A\B;
% ______________________________________________________________________________________________
% Outputing the member forces:
fprintf('Member Forces(kip):\n\n')
fprintf('BC = %5.3f CH = %5.3f GH = %5.3f\n',F(1),F(2),F(3))
Output:
Member Forces(kip):
BC = 1.375 CH = 5.858 GH = -7.674
Figure 5. The MATLAB Script File and a Sample Output for the Analysis of a Truss
Using the Method of Sections
Writing the force and moment equilibrium equations for the free body diagrams of the two
sections of the beam shown at the bottom of Figure 4, the following expressions for the shear
force V and bending moment M can be established for each of the beam segments AB and BC.
(6)
(7)
2
) (
2
) (
2
0 0
2
2
2 1
2
1
2 2
2
1
2 1
x a w
M x
L
wa
M
x a w V
L
wa
V
a x L x
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
Upon substituting for the moments M
1
and M
2
in the differential equations of the two regions of
the beam shown below:
(8)
the following two differential equations are obtained for the beam.
(9)
In these expressions E, and I are respectively the modulus of elasticity and the moment of inertia
of the beam. All other parameters are as defined in Figure 4. Upon utilizing the method of
successive integration and applying the boundary conditions:
0 ) 0 (x , 0 ) 0 (
2 2 1 1
v x v (10)
stating that the deflection of the beam at the supports A and B are zero, and the continuity
equations:
) 0 ( ) ( ), 0 ( ' ) ( '
2 2 1 1 2 2 1 1
x v L x v x v L x v (11)
stating that there should only be a single value for the slope and a single value for the deflection at
point B, the following expressions are obtained for the slope v and deflections v for the two beam
segments AB and BC.
(12)
(13)
Now that the theoretical formulation of the problem is complete, a MATLAB script file can be
created. The script file can be developed in a form which prompts the user to input the values for
the parameters w, E, I, L, and a. Then, a MATLAB loop can be employed to compute the values
for the shear, moment, slope, and deflection along the length of the beam for a series of values of
x, measured from the left support at A, starting from x = 0 and ending at x = L. Note that it is
necessary to include a conditional statement within the loop, so that the proper expressions for the
determination of unknowns is selected and used in the computations. The MATLAB script file
for the given beam is provided in Figure 6, along with the generated plots in Figure 7. These
2 2 1 1
2 1
" "
0 0
M EIv M EIv
a x L x
2
) (
"
2
"
0 0
2
2
2 1
2
1
2 1
x a w
EIv x
L
wa
EIv
a x L x
) 4 6 4 (
24
) (
12
) 3 3 (
6
' ) 3 (
12
'
0 0
3
2
2
2 2
2 2 2
2
2
1
2 1
2
1
3
2
2
2 2
2 2
2
2
1
2
2
1
2 1
x ax x a L a
EI
wx
v x L
EIL
x wa
v
x ax x a L a
EI
w
v x L
EIL
wa
v
a x L x
+ +
+ +
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
plots are for the case when w = 0.2 kip/ft, E = 29000 ksi, I = 100 in
4
, L = 20 ft, and a = 10 ft.
Using the powerful MATLAB plotting commands and tools, the users can control and create the
plots in any format they desire.
function case_1
% Uniformly distributed load acting on the overhang (created by team 1)
% ____________________________________________________________________________________________
% Function objective:
% To compute and plot the distribution of the shear force, bending moment, slope, and
% deflection along the length of a given overhanging beam subjected to a Uniformly distributed
% load acting on the overhang.
% ____________________________________________________________________________________________
% Data acquisition:
w=input('Enter the value of the distributed load(kip/ft):\n');
E=input('Enter the value of the modulus of elasticity(ksi):\n');
I=input('Enter the value of moment of inertia(in^4):\n');
L=input('Enter the value L(ft):\n');
a=input('Enter the value a(ft):\n');
w=w/12;L=L*12;a=a*12;
fprintf(' x(in.) Shear(kip) Moment(kip.in) Slope(rad) Deflection(in)\n')
% ____________________________________________________________________________________________
% Computing the shear, moment, slope, and deflection.
x=linspace(0,L+a,(L+a)/6+1);
for k=1:1:(L+a)/6+1
if x(k)<=L
x1(k)=x(k);
V(k)=-w*a^2/(2*L);
M(k)=-w*a^2*x1(k)/(2*L);
theta(k)=w*a^2*(L^2-3*x1(k)^2)/(12*E*I*L);
delta(k)=w*a^2*x1(k)*(L^2-x1(k)^2)/(12*E*I*L);
fprintf('%4.0f %12.3f %14.3f %19.2e %17.2e\n',x(k),V(k),M(k),theta(k),delta(k))
else
x2(k)=x(k)-L;
V(k)=w*(a-x2(k));
M(k)=-w*(a-x2(k))^2/2;
theta(k)=-w*(a^2*L+3*a^2*x2(k)-3*a*x2(k)^2+x2(k)^3)/(6*E*I);
delta(k)=-w*x2(k)*(4*a^2*L+6*a^2*x2(k)-4*a*x2(k)^2+x2(k)^3)/(24*E*I);
fprintf('%4.0f %12.3f %14.3f %19.2e %17.2e\n',x(k),V(k),M(k),theta(k),delta(k))
end
end
% ____________________________________________________________________________________________
% plotting the shear, moment, slope, and deflection.
subplot(2,2,1),plot(x,V),title('Shear'),xlabel('x (in)'),ylabel('Shear Force (kip)'),...
axis([0 360 -1 3]),set(gca,'XTick',[0:60:L+a]),text(60,0,'V_1 =-wa^2/(2L)'),...
text(250,2.2,'V_2 =w(a-x_2)')
subplot(2,2,2),plot(x,theta),title('Slope'),xlabel('x (in)'),ylabel('Slope (rad)'),...
axis([0 360 -0.006 .004]),set(gca,'XTick',[0:60:L+a]),text(10,-0.003,...
'\theta_1 =wa^2(L^2-3x_1^2)/(12EIL)'),text(40,0.002,'\theta_2 =-w(a^2L+3a^2x_2-3ax_2^2+x_2^3)/(6EI)')
subplot(2,2,3),plot(x,M),title('Moment'),xlabel('x (in)'),ylabel('Moment (kip.in)'),...
axis([0 360 -150 50]),set(gca,'XTick',[0:60:L+a]),text(30,-90,'M_1 =-wa^2x_1/(2L)'),...
text(210,20,'M_2 =-w(a-x_2)^2/2')
subplot(2,2,4),plot(x,delta),title('Deflection'),xlabel('x (in)'),ylabel('Deflection (in)'),...
axis([0 360 -0.6 0.4]),set(gca,'XTick',[0:60:L+a]),,text(10,-0.1,'v_1 =wa^2x_1(L^2-x_1^2)/(12EIL)'),...
text(5,0.25,'v_2 =-wx_2(4a^2L+6a^2x_2-4ax_2^2+x_2^3)/(24EI)')
Figure 6. The MATLAB Script for the Analysis of a Statically Determinate Beam
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
Figure 7. Plot of Shear Force, Bending Moment, Slope, and Deflection
In preparation for teaching the course in the fall semester of 2002, the authors have decided to
divide the class into several teams and require each team to provide the solution for a different
loading condition acting on the beam. For example, distributed loading over the overhang can be
assigned to team 1, distributed loading acting between the supports to team 2, distributed loading
over the entire beam to team 3, and so on. When preparing the script files for these problems, the
teams are asked to place their scripts in separate function M-files, so that these functions can be
utilized later by other script files. The reason for this request is that the authors plan to combine
the work of all teams into one comprehensive main script, which is capable of making calls to
each of the function M-files prepared by the teams. This main script is shown in Figure 8. Note
that the script file is prepared in a fashion that when executed it provides the user with a menu to
indicate the type of the loading for which the computation is to be performed. This menu is
shown in Figure 9. Obviously more loading cases can be included in the formulation of this
problem to produce a more powerful script file. It should also be stated that the solution of the
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
problems developed by the teams can as well be combined using the superposition method to
generate the results for other combined loading cases.
% Analysis of a Statically Determinate Beam.
% ____________________________________________________________________________________________
% Program objective:
% To compute and plot the distribution of the shear force, bending moment, slope, and
% deflection along the length of a given overhanging beam.
% ____________________________________________________________________________________________
% Program interactivity:
% Providing the user with a menu so that the desired option can be selected.
k=menu('Choose the Loading Type',...
'Option 1: Uniformly Distributed Load on Overhang ',...
'Option 2: Uniformly Distributed Load Between Supports ',...
'Option 3: Uniformly Distributed Load Over the Entire Beam ',...
'Option 4: Concentrated Load at the End of Overhang ',...
'Option 5: Concentrated Load at Any Point Between Supports');
% ____________________________________________________________________________________________
% Depending upon the option selected, a call is made to one of the four functions entitled as:
% case_1, case_2, case_3, or case_4.
if(k==1)
case_1
% case_1: Uniformly distributed load acting on the overhang.'
% (Assigned to team 1)
elseif(k==2)
case_2
% (case_2: Uniformly distributed Load acting between the supports.'
% (Assigned to team 2)
elseif(k==3)
case_3
% case_3: Uniformly distributed load acting over the entire Beam.'
% (Assigned to team 3)
elseif(k==4)
case_4
% case_4: Concentrated load acting at the end of the overhang.'
% (Assigned to team 4)
else
case_5
% case_5: Concentrated load acting at any point between the supports.'
% (Assigned to team 5)
end
Figure 8. The Main MATLAB Script File Developed for Utilizing the Function M-Files Created
by the Teams
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
Figure 9. Snapshot of the Menu Created by the Developed MATLAB Script File
IV. Analysis of Statically Indeterminate Frames (Slope-Deflection Method)
The method of solution for analyzing a statically indeterminate frame using the method of slope-
deflection is described in this section of the paper through the following example problem.
Suppose that for the frame shown in Figure 10, the following moments are to be computed at the
ends of the members AB, BC, and BD (i.e., M
BA
, M
BD
, M
DB
, M
BC
, and M
CB
).
Figure 10. A Statically Indeterminate Frame
Applying the well-known slope-deflection method to members AB, BC, and BD of the frame, the
following expressions for the end-moments of the members are obtained.
BA B AB BA
FEM Ek M ) ( 3 + (14)
P
LAB LBD
LBC
LDE
w
A
B
C
E
D
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
BD D BD B BD BD
FEM Ek Ek M ) ( 2 4 + + (15)
DB B BD D BD DB
FEM Ek Ek M ) ( 2 4 + + (16)
BC B BC BC
FEM Ek M ) ( 4 + (17)
CB B BC CB
FEM Ek M ) ( 2 + (18)
In these expressions, M, E, k, , and FEM are respectively, the moment at the end of members,
modulus of elasticity, the relative-stiffness factor of members, angular displacements at the end of
members, and member fixed-end moments. The fixed-end moments used in the above expressions
for the given beam and loading conditions are given by the following equations.
(19)
(20)
(21)
(22)
(23)
Note that the relative-stiffness of the members in Eqs. (14) through (18) can be computed by
dividing the moments of inertia of each member by the corresponding length of the member, i.e.,
BC BC BC BD BD BD AB AB AB
L I k L I k L I k / , / , / (24)
Also, considering the moment equilibrium of joints B and D, the following two equations can be
added to the list of the equations already presented.
0 + +
BD BC BA
M M M (25)
0 +
DE DB
pL M (26)
The Eqs. (14) through (18) together with the Eqs. (25) and (26), can be expressed in the matrix
format as the following system of linear equations.
12 /
2
) (
BD
wL FEM
DB
8 /
2
) (
AB
wL FEM
BA
12 /
2
) (
BD
wL FEM
BD
0 ) (
BC
FEM
0 ) (
CB
FEM
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
'
'
1
1
1
1
1
1
1
1
1
]
1
DE
CB
BC
DB
BD
BA
CB
BC
DB
BD
BA
D
B
BC
BC
BD BD
BD BD
AB
pL
FEM
FEM
FEM
FEM
FEM
M
M
M
M
M
Ek
Ek
Ek Ek
Ek Ek
Ek
0
) (
) (
) (
) (
) (
0 0 1 0 0 0 0
0 1 0 1 1 0 0
1 0 0 0 0 0 2
0 1 0 0 0 0 4
0 0 1 0 0 4 2
0 0 0 1 0 2 4
0 0 0 0 1 0 3
.
.
(27)
The presented solution has the general format of AX=B. Using this expression, the elements of
the column vector X, which contains the unknowns in the problem, can be computed. The
unknowns in this case consist of the member moments M
BA
, M
BD
, M
DB
, M
BC
, and M
CB
, as well as,
the angular displacements
B
and
D
. The MATLAB solution for the presented example
problem, involves the creation of matrices A and B, and the utilization of the left-division
operation as explained earlier in the paper. The MATLAB script file for the presented problem
and the corresponding results for the case when w = 2 kip/ft, P = 8 kip, E = 29000 ksi, I = 100
in
4
, L
AB
= 15 ft, L
BC
= 12 ft, L
BD
= 12 ft, and L
DE
= 8 ft are provided in Figure 11.
V. Summary and Conclusion
A procedure for complementing a structural analysis course using the MATLAB software is
discussed in this paper. The solutions for three sample commonly encountered problems are
formulated using several well-known methods of analysis and discussed to fully describe the
procedure. The developed scripts files, similar to the ones presented in the paper, can serve as a
valuable educational tool to further enhance the students understanding of the structural analysis
concepts. The students have the opportunity to run the developed script files for different beam
and loading conditions, examine and compare the results, and learn more in the process. The
students can also use the script files to perform a check on the their developed hand-solutions.
The project described in this paper has a number of educational outcomes in terms of student and
course development. The exercises promote more interactions among the students, and between
the students and the instructor, leading to a better teaching and learning environment. Through
this project the students also learn how to use various powerful tools and features of the
MATLAB computing software, an experience that will serve the students well in their future
academic and professional careers.
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
% Analysis of a Statically Indeterminate Frame Utilizing the Slope-Deflection Method.
% ______________________________________________________________________________________________
% Program objective:
% To compute the moments at joints B, C, and D of the given frame using the method of slope-deflection.
% ______________________________________________________________________________________________
% Data acquisition:
w=input('Enter the value of the distributed load (kip/ft)\n');
p=input('Enter the value of the concentrated load (kip)\n');
E=input('Enter the value of the modulus of elasticity (ksi)\n');
IAB=input('Enter the moment of inertia of member AB (in^4)\n');
IBC=input('Enter the moment of inertia of member BC (in^4)\n');
IBD=input('Enter the moment of inertia of member BD (in^4)\n');
LAB=input('Enter the length of member AB (ft)\n');
LBC=input('Enter the length of member BC (ft)\n');
LBD=input('Enter the length of member BD (ft)\n');
LDE=input('Enter the length of member DE (ft)\n');
% ______________________________________________________________________________________________
% Computation of the fixed end moments:
FEMBA=w*LAB^2/8;
FEMBD=-w*LBD^2/12;
FEMDB=+w*LBD^2/12;
FEMBC=0;
FEMCB=0;
% ______________________________________________________________________________________________
% Computation of the relative stiffness factor of the members:
kAB=IAB/LAB;
kBC=IBC/LBC;
kBD=IBD/LBD;
% ______________________________________________________________________________________________
% Computation of the angular displacements and moments:
A=[-3*E*kAB,0,1,zeros(1,4);-4*E*kBD,-2*E*kBD,0,1,zeros(1,3);-2*E*kBD,-4*E*kBD,0,0,1,0,0;...
-4*E*kBC,zeros(1,4),1,0;-2*E*kBC,zeros(1,5),1;0,0,1,1,0,1,0;zeros(1,4),1,0,0];
B=[FEMBA;FEMBD;FEMDB;FEMBC;FEMCB;0;p*LDE];
F=A\B;
% ______________________________________________________________________________________________
% Outputing the angular displacements and moments:
fprintf('Angular displacement at B = %10.3e rad\n\n',F(1))
fprintf('Angular displacement at D = %10.3e rad\n\n',F(2))
fprintf('MBA = %6.1f kip.ft\n',F(3))
fprintf('MBD = %6.1f kip.ft\n',F(4))
fprintf('MDB = %6.1f kip.ft\n',F(5))
fprintf('MBC = %6.1f kip.ft\n',F(6))
fprintf('MCB = %6.1f kip.ft\n',F(7))
Output:
Angular displacement at B = -2.300e-005 rad
Angular displacement at D = 5.288e-005 rad
MBA = 42.9 kip.ft
MBD = -20.7 kip.ft
MDB = 64.0 kip.ft
MBC = -22.2 kip.ft
MCB = -11.1 kip.ft
Figure 11. The MATLAB Script File and a Sample Output for the Analysis of a
Statically Indeterminate Frame Using the Slope-Deflection Method
Proceedings of the 2002 ASEE/SEFI/TUB Colloquium
Copyright 2002, American Society for Engineering Education
Bibliography
1. Hibbeler, R.C. Structural Analysis, Fifth Edition, Prentice Hall, 2002.
SHAHNAM NAVAEE
Shahnam Navaee is currently an Associate Professor in the Engineering Studies Program at Georgia Southern
University where his primary responsibility is teaching freshman and sophomore level courses to engineering transfer
students. Dr. Navaee received his B.S. and M.S. degrees in Civil Engineering from Louisiana State University in 1980
and 1983 and his Ph.D. degree from the Department of Civil Engineering at Clemson University in 1989.
NIRMAL K. DAS
Nirmal K. Das is an Associate Professor of Civil Engineering Technology at Georgia Southern University, He received
his Bachelor of Civil Engineering Degree from Jadavpur University, India, and his M.S. and Ph.D. degrees in Civil
Engineering (structures) from Texas Tech University. His areas of interest include structural analysis, structural design,
and wind engineering. Dr. Das is a registered professional engineer in Ohio and Georgia.