COMPUTER ASSIGNMENTS HELP PAGE
for Carol Hasenberg's Classes

 


Reiteration of the Homework Options from the Syllabus:

Homework Options:

 
Problem Assignments

For problem assignments, refer to the homework assignments page of your class website (there is more than one class involved here).  You may select any of the problems assigned as long as you fulfill the requirements listed above for your chosen option.

Example Problems

Statics Particle Equilibrium Problem:

This problem is an example of solving a three dimensional particle equilibrium system.  Solving this problem consists of creating direction vectors, transferring the direction vectors to unit vectors, and using the unit vector coefficients as force coefficients in the equilibrium equations.  The three equations generated are then solved by matrix methods in most cases.  An outline of the matrix solution method is shown in the alternative method of the hand worked solution and in pages 412-419 of the book Excel for Scientists and Engineers by William J. Orvis, described in the Excel overview.

This problem was especially easy to solve in Matlab because it involved operating on matrices.  The Matlab work session is shown, where the instructor worked the problem interactively.  Then the commands were pasted into a *.m file and developed into a Matlab user-defined function.  The functions developed for the solution are shown at the end of the file.

The problem was fairly easy to solve in Excel, as long as you are aware of how to work with arrays (this is why you hit control-shift-enter when you enter a matrix inversion or matrix multiplication formula).  The Excel example solves the problem two ways - with and without matrix methods.

The examples shown here are in *.pdf files, so you cannot interact with them.

Hand Worked Solution  - contains Given and Required statements for the problem that you must include with your computer homeworks (like with the regular homework problems)
Matlab Work Session and Functions
Excel Solution
Excel Formulas
Statics Centroid Problem:

This problem is an example of numerically finding the centroid of an object by breaking it into small rectangular boxes.  If the centroids of each box are known, then it is just a matter of applying the composite area centroid equation on the system of boxes to determine the centroid.  This problem assignment is to find the centroid of an area lying between a straight line and the arc of a circle below the line.  Both the line and the bottom-most point in the circle pass through the origin, and the line must intersect the circle lower than or at the rightmost point.

I first solved this problem in Excel, by setting up a series of 10 boxes of equal width.  The centroids of the boxes are determined, as well as the area.  The composite area equation is applied and the results presented.  This is a very easy problem to solve in Excel.  Notice the use of the $ signs on the cell addresses which are not to change when the formulas are copied.  Refer to absolute and relative referencing in the Excel overview.  A graph of the line (taken at the center of each box), the circle and the centroid was easy to make in the Excel chart wizard.

The problem was a little more difficult to solve in Matlab, but has the advantage that it is more flexible.  The computation is done in a Matlab script. A for loop was set up for computing the values generated by each box.  Interactive input was used, with some cautionary statements in case the user tries to input bogus information.  The user can determine the number of boxes that will be used, so that the answer is more accurate that that of the Excel spreadsheet.  A graph comparable to that done in Excel is generated.  The student can add graph titles, etc., as appropriate.

Here is the problem statement:

Given:  An area bounded by the equation of a line of slope m passing through the origin and a circle of radius b and center (0,b).  The area is bounded on the left by the x-value x1 and on the right by the x-value x2. Conditions 0<=x1<x2<= 2bm/(m^2 +1), and m<=1.

Required:  Determine the coordinates of the centroid by breaking the area into 10 tall thin rectangular elements.

Picture of the problem
Matlab Work Session and Functions
Excel Solution
Excel Formulas

Click here to return to Carol Hasenberg's Home Page.