Top-Down Design & Structured Programming: Summing Maclaurin Series for exp(x) with MATLAB , Study notes of Engineering

The process of designing and implementing a program to sum the maclaurin series for the exponential function exp(x) using matlab. The problem is stated, inputs and outputs are enumerated, and the algorithm is designed and refined. The document also includes a pseudo code representation of the program.

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-28l-1
koofers-user-28l-1 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
AOE/ESM 2074 - E.M. Cliff 1
Top Down Design
or
Structured Programming
State the Problem
Enumerate input(s) and
output(s)
pf3
pf4
pf5

Partial preview of the text

Download Top-Down Design & Structured Programming: Summing Maclaurin Series for exp(x) with MATLAB and more Study notes Engineering in PDF only on Docsity!

✫ ✬

✪ ✩

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

1

x , and so on

Note that

term

k

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