



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




✫ ✬
✪ ✩
Top Down Design
or
Structured Programming
State the Problem
output(s)Enumerate input(s) and
✫ ✬
✪ ✩
refined)Design the Algorithm (this is
Convert to
Matlab
Test code components
Assemble and test
✫ ✬
✪ ✩
The Maclaurin series for
exp(
x )
is exp(
x ) = 1 +
(^) x (^) +
x 2
x n
n !
(^)...
Let’s designate
term
0 = 1
term
x , and so on
Note that
term
term
k − 1 k x
When
term
k < tol
stop the sum
✫ ✬
✪ ✩
The
relative terror
is
rel
sum
(^) exp(
x ) |
exp(
x )
of terms and the relative errorPrint out the sum,the number
✫ ✬
✪ ✩
tol continue, if next term exceeds
compute relative error
print information to the screen