COMPUTER ASSIGNMENTS HELP PAGE
for Carol Hasenberg's Classes
Reiteration of the Homework Options from the Syllabus:
Homework Options:
Traditional:
Student works assigned homework according to
instruction sheet. Student completes 3
of the assigned computer homework problems on computer (Matlab or
Excel) – one
from assignments 1-3, one from assignments 4-5, one from assignments
6-8.
Group of Two Students:
Two students work together as a group and hand in one set of homework
problems for each assignment. Students complete 5 of the assigned
computer
problems on computer (Matlab or Excel) – two from assignments 1-3, two
from
assignments 4-5, one from assignments 6-8.
Group of Three Students:
Three students work together as a group and hand in one set of homework
problems for each assignment. Students complete 7 of the assigned
computer
problems on computer (Matlab or Excel) – three from assignments 1-3,
two
from assignments 4-5, two from assignments 6-8.
Computer Homework Assignments
Computer Homework problems are to be completed just like ordinary
homework
problems, except that the solution section will include printouts from
the
computer solution. Given, required, and solutions sections must
be completed.
The student should derive equations or procedure used in the computer
solution.
The student has the option of using Matlab or Excel to solve computer
homework
problems. Due dates for computer problems are given in the class
calendar.
- Matlab problems are to be submitted by the due dates given in
the
class calendar. The matlab output should include an edited,
commented session
and/or command sequence and copies of all user generated scripts and
functions.
The comments outline the solution for the grader. The given and
required
sections may be included as a preface to the output (you can edit all
of
this in a word processor such as MSWord or text editor) or submitted on
an
extra sheet. Indicate the output. Make sure that all the
submitted sheets
include ID information which includes the student's name, assignment,
class,
and problem number.
- Excel Problems are to be submitted by the due dates given in
the
class calendar. The calculations required by the problem are to
be done
using spreadsheet formulas. The problem Given and Required
sections are
either to be typed into the spreadsheet or submitted on an additional
page.
All the submitted sheets should include the student's name, assignment,
class,
and problem number. In addition to the normal Excel output, the
student
should submit a printout showing (a) the problem formulas (using the
Tools/Options/View/Formulas
checkbox) and (b) the row and column headers (in print preview, use
PageSetup/Sheet/Row
and Column Headings checkbox). The printouts must not exceed 2
pages in
size. For a quick overview
of using Excel, click here. See the instructor for more help.
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.

Matlab Work Session and
Functions
Excel Solution
Excel Formulas
Click here to return to Carol Hasenberg's Home
Page.