[ENGR 101] - Midterm Exam Guide - Comprehensive Notes for the exam (111 pages long!)

106 views111 pages
7 Feb 2017
School
Department
Course

For unlimited access to Study Guides, a Grade+ subscription is required.

U of M
ENGR 101
MIDTERM EXAM
STUDY GUIDE
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 111 pages and 3 million more documents.

Already have an account? Log in
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 111 pages and 3 million more documents.

Already have an account? Log in
Writing Functions in MATLAB
suppose we want to write a function in MATLAB that takes as input the initial height, x0,
and velocity, v0, of a ball at time zero along with a duration, tmax, to simulate the ball’s
trajectory
the function plots the height and velocity of the ball over the duration of the simulation
v = g*t+v0
h = g*t^2+v0*t+h0
Program design can easily be done by making use of flow charts
Parts of a flow chart-
terminal positions
rectangular oval
start/end
do something
process of task
rectangles or squares
specify instructions that create data
selection
decision box
create both selection and iteration
has a question in it
follow the flow
yes or no
get input and/or send output
Implementing Code-
begin with the header
comment the code
include a glossary of your identifiers
variables that have non-standard names
comment individual segments of code
make time array
calculate velocity and position
numel - function that returns number of elements in an array
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 111 pages and 3 million more documents.

Already have an account? Log in
USING ITERATION
A BETTER WAY
uses the equations with vectors
will output a vector of velocities
Plotting
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 111 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$10 USD/m
Billed $120 USD annually
Homework Help
Class Notes
Textbook Notes
40 Verified Answers
Study Guides
1 Booster Class