You are on page 1of 1

Writing Matlab Scripts:

Computing forces on a truss

Writing Matlab m-files is another way to compile a series of Matlab commands into one script and is
often necessary when performing complicated computations. The structure is slightly different than a
function in that no values are returned and you do not pass values to the script. Commands can be
entered into a scrip m-file just as they would be typed at the command prompt.
In this tutorial, we will examine the forces on a truss structure seen in the figure below and the
following problem: Consider the cantilevered truss as sketched in the figure below, and calculate the
forces in each member if a wind load of approximately 1000 N is added at joint D. That is, let L1
=1000N, L2 = 500N, and L N 3 =1000 . State which members are in tension and which are in
compression, and determine the reaction forces as well.

You might also like