ME 352
Quiz 1 Solutions
Fall 2008
Note: You can check these results by entering the expressions into Matlab.
1.
> x = 0:1:1
x =
0
1
2.
> x = [0 2 4 6 8 10];
> y = x/max(x)
y =
0
0.2000
3.
0.4000
0.6000
0.8000
1.0000
> x = linspace(10,50,5);
> y = ( min(x)

ME 352
Quiz 1
16 October 2008
Your Name:
This exam booklet contains
1. This cover sheet.
2. A sheet with information on Matlab built-in functions.
3. Four short answer questions.
4. Two questions requiring an understanding of Matlab m-le functions.
Do not

ME 352
Quiz 2
25 November 2008
Print Your Name:
Your Signature:
This exam booklet contains
1. This cover sheet.
2. Three multiple-choice questions.
3. Three short answer questions.
Do not open the exam booklet until you are instructed to do so.
You will h

ME 352
Midterm Exam Solution
Fall 2008
1. Let x = a and x = b be the brackets for a root-nding problem for a scalar function f (x). If
= b a is the size of the original bracket, the size of the interval containing the root after
four iterations of the bi

ME 352
Midterm Exam
4 November 2008
Print Your Name:
Your Signature:
This exam booklet contains
1. This cover sheet.
2. Nine questions ranging in value from 5 points to 30 points. The point value
increases with the number of the question. The maximum poss

ME 352
Final Exam
11 December 2008
Print Your Name: Your Signature:
This exam booklet contains 1. This cover sheet. 2. Multiple choice and true/false questions worth 5 points each. 3. Additional questions ranging in value from 10 points to 20 points. The

ME 352
Final Exam Solution
Fall 2008
1. Analysis of the eects of roundo on the numerical solution to a system of n equations in n
unknowns leads to the following expression
xx
x
(A)
r
b
where x is the numerical solution to Ax = b, (A) is the condition nu

ME 352
Quiz 2 Solution
Fall 2008
1. An n n matrix is ill-conditioned if two or more rows of the matrix are nearly linearly
dependent.
2. Consider two n element column vectors, u and v, and a small, positive scalar value, . A mathematical statement that th

ME 352
Problem Set 6
18 November 2008
Quick Questions
Refer to the details on each problem for the expectation of the solution.
1. (10 points) Textbook problem 7.5. Show at least one intermediate step for each part. For
example, here is my partial solutio

ME 352 Homework Format
Fall 2008
Homework assignments will consist of a mixture of problem types. Some
problems will ask you to perform a specic, short, task. Others will involve the
development of programs. This document provides instructions for complet

ME 352
Problem Set 5
due noon, 3 November 2008
This assignment is for extra credit only. Points earned on this assignment will be added to
your point total for all homework problems. The total number of points that can possibly
be earned will not increase

ME 352
Problem Set 1
due 2 October 2007
Quick Questions
1. (15 points) Use Matlab to evaluate the following formulas. Show the results of executing
the formulas in a Matlab session. For each formula use variables, not numerical values for
the constants gi

ME 352
Problem Set 1
due 7 October 2008
Quick Questions
Use Matlab to evaluate the following formulas. Show the results of executing the formulas in
a Matlab session. For each formula use variables, not numerical values for the constants given at
the star

ME 352
Problem Set 4
due 28 October 2008
Quick Questions
In the textbook problem 5.21, the following formula is given for the optimum damping ratio
of a spring-mass-damper system
cos 4
1 2 = 1 + 8 2 8 4
( )
1. (5 points) Rearrange Equation ( ) in at leas

CS 401: Applied Scientific
Computing with MATLAB
Andrew Pershing
3134 Snee Hall
ajp9@cornell.edu
255-5552
Outline
Course Description
Details
Policies
Intro to CIS Tools Curriculum
Role of Computing in Science and
Engineering
Basic Concepts
Course Goals

This is
Course Business:
http:/www.cs.cornell.edu/Courses/cs401/2001fa
Contains syllabus, lecture notes, examples, homework
Office Hours
Monday & Tuesday, 11-1 in 3134 Snee (or by appointment)
Registration:
get my signature or CS Undergrad office (3

Matlab Fundamentals:
working
with
data
Outline
Errata & Homework I.
Matrix Multiplication
ND-arrays
Loading, saving, and plotting data
Matlab History
Matlab stands for Matrix Laboratory
Developed by from LAPACK-a series of
routines for numerical linear

Text Processing
Outline
Announcements:
Homework I: due Today. by 5, by e-mail
Discuss on Friday.
Homework II: on web
Text
Matlab path
Survey
This isnt English!
Why do we need text?
Comments from functions
File names
Label plots
Interact with users

Improving perfomance
Matlabs a pig
Outline
Announcements:
Homework I: Solutions on web
Homework II: on web-due Wed.
Homework I
Performance Issues
Homework I
Grades & comments are waiting in your
mailboxes
PASS-you passed!
try to learn from your mi

Matlab Programming
a logical
approac
h
Outline
Announcements:
Homework I: due Wed. by 5, by e-mail
Last day to add/drop or change credit/audit
Iteration
Conditionals and logic
M-files
Iteration
For loops in Matlab use index-notation:
for j=st:step:

Input Output
Garbage In,
Garbage Out
Outline
Announcements:
Homework III: due Today. by 5, by e-mail
Discuss on Friday.
Homework IV: on web, due following Friday
Linear Systems Example: AdvectionDiffusion
Advanced ASCII
Binary Basics
Key Points on

Ordinary Differential
Equations
Outline
Announcements:
Homework II: Solutions on web
Homework III: due Wed. by 5, by e-mail
Homework II
Differential Equations
Numerical solution of ODEs
Matlabs ODE solvers
Homework II
Good job
Something I learned:
l

Stochastic Simulations
Six degrees of
Kevin Bacon
Outline
Announcements:
Homework II: due Today. by 5, by e-mail
Discuss on Friday.
Homework III: on web
Random Numbers
Example-Small Worlds
Random Numbers
Computers are deterministic
Therefore, comp

Linear Systems
What is the
Matrix?
Outline
Announcements:
Homework III: due Wed. by 5, by e-mail
Office Hours: Today & tomorrow, 11-1
Ideas for Friday?
Linear Systems Basics
Matlab and Linear Algebra
Ecology of Linear Systems
Linear Systems are fou

Statistics and Simple
Plots
Outline
Announcements:
Homework II: due Today. by 5, by e-mail
Statistics
Simple plots
Statistics
Descriptive
summarize properties of data
Comparative
compare data sets
test hypotheses
Descriptive Stats
Most common de

CS 401: Applied Scientific
Scientific
Computing with MATLAB
Andrew Pershing
3134 Snee Hall
ajp9@cornell.edu
255-5552
Outline
Course Description
Details
Policies
Intro to CIS Tools Curriculum
Role of Computing in Science and
Engineering
Basic Concepts
Cou

This is
is
Course Business:
http:/www.cs.cornell.edu/Courses/cs401/2001fa
Contains syllabus, lecture notes, examples, homework
Office Hours
Monday & Tuesday, 11-1 in 3134 Snee (or by
appointment)
Registration:
get my signature or CS Undergrad office

Statistics and Simple Plots
Outline
Announcements:
Homework II: due Today. by 5, by e-mail
Statistics
Simple plots
Statistics
Descriptive
summarize properties of data
Comparative
compare data sets
test hypotheses
1
Descriptive Stats
Most common