{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Lec8 - 7 The Discrete vs The Continuous(Cont'd Screen...

This preview shows pages 1–11. Sign up to view the full content.

7. The Discrete vs The Continuous (Cont’d) Screen Granularity Finite Arithmetic More practice with iteration and conditionals.

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

View Full Document
The 1991 Patriot Missile Disaster Elementary misperceptions about the finiteness of computer arithmetic. 30+ died.
The Setting External clock counts time in tenths of seconds. Targeting software needs time to compute trajectories. The method: Time = (# external clock ticks) x (1/10) The problem is here

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

View Full Document
One-Tenth in Binary Exact: .00011001100110011001100110011… Patriot System used: .00011001100110011001100110011… Error = .000000095sec every clock tick
Error Time = (# external clock ticks) x (1/10) Error = (# external clock ticks) x (.000000095)

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

View Full Document
After 100 hours… Error = (100x60x60*10)*.000000095 = .34 secs Missed target by 500 meters.
8. Plotting Continuous Functions Linspace Array Operations

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

View Full Document
Table Æ Plot -1 0 1 2 3 4 5 6 7 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 sin(x) x sin(x) 0.00 0.0 1.57 1.0 3.14 0.0 4.71 -1.0 6.28 0.0 Plot based on 5 points
Table Æ Plot -1 0 1 2 3 4 5 6 7 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 sin(x) x sin(x) 0.000 0.000 0.784 0.707 1.571 1.000 2.357 0.707 3.142 0.000 3.927 -0.707 4.712 -1.000 5.498 -0.707 6.283 0.000 Plot based on 9 points

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

View Full Document
Table Æ Plot -1 0 1 2 3 4 5 6 7 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 sin(x) Plot based on 200 points—looks smooth
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern