Code for Lecture 3

Code for Lecture 3 - Lecture3Homework BobAstrom Exercise3.1

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 3 Homework Bob Astrom Exercise 3.1 By trial and error the lowest value of n is n = 24 with an answer of 1.475773161594552 Calculation by TI 89 with the significant digits set at the maximum is 1.47577316159 Thus the answer given by MATLab is more accurate than the TI 89 can display When the answer is input into the program the output contains 4 more significant digits and converges again after 7 more iterations. Code and Answers for Exercise 3.2 %l3p2 %Math 344 %Homework Problem 3.2 % or %Homework Lecture 2 Problem 2 ==> (l3p2) %Written by Bob Astrom % %***Returns the distance traveled by a ball after "n" bounces*** function distance = l3p2(n) % Solves for the total distance traveled after each cycle of the periodic motion % of a bouncing ball with a coefficient of elasticity of 0.9 by performing n iterations % of the equation with an initial height of 2 meters. % The program also outputs the distance the ball drops and height of the % return bounce. %
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2011 for the course MATH 345 taught by Professor Staff during the Spring '08 term at Ohio State.

Page1 / 2

Code for Lecture 3 - Lecture3Homework BobAstrom Exercise3.1

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online