Example of menu driven modular program, MATLAB in Engineering

Example of Menu driven modular program:

As an illustration of such a menu-driven program, we will write a program to discover the constant e.

The constant e, known as the natural exponential base, is used broadly in mathematics & engineering. There are many diverse applications of this constant. The value of the constant e is around 2.1718. Raising e to the power of x, or ex, is so general that this is known as the exponential function. In MATLAB, we have seen that, there is a function for above, exp.

The one way to determine the value of e is by finding a limit.

547_Example of Menu driven modular program.png

 

Since the value of n increases on the way to infinity, the outcome of this expression approaches the value of e.

The approximation for an exponential function can be found by using what is known as the Maclaurin series:

2316_Example of Menu driven modular program1.png

 

Posted Date: 10/19/2012 8:25:59 AM | Location : United States







Related Discussions:- Example of menu driven modular program, Assignment Help, Ask Question on Example of menu driven modular program, Get Answer, Expert's Help, Example of menu driven modular program Discussions

Write discussion on Example of menu driven modular program
Your posts are moderated
Related Questions
Appending variables to the Mat-File: Appending to the file adds to what has been saved in a file, and is accomplished by using the -append option. For illustration, supposing

Uses of Function handles: The Function handles can also be generated for functions other than anonymous functions, both built-in & user-defined functions. For illustration, th

Sort algorithm for Sorting vectors of structures: Note that only the price field is compared in the sort algorithm, but the whole structure is replaced. That is therefore each

Initializing the data structure - Function: Function is shown as:   >> printcylvols(cyls) Cylinder x has a volume of 169.6 Cylinder a has a volume of 100.5

Finding products by for loop: an illustration, when 5 is passed to be the value of the input argument n, the function will compute and return 1 + 2 + 3 + 4 + 5, or 15: >> s

Illustration of if - else statement: The one application of an if-else statement is to check for errors in the inputs to a script. For illustration, a former script prompted t

analyzing traffic; determine motion of flow; calculate tracklets; detect abnormalities;

Passing Structures to Functions: The whole structure can be passed to a function, or separate fields can be passed. For illustration, here are the two distinct versions of a f

Related Structure Functions: There are many functions which can be used with structures in a MATLAB. The function isstruct will return 1 for logical true when the variable arg

Image Processing: The Images are represented as grids, or matrices, of picture elements (known as pixels). In MATLAB an image usually is represented as a matrix in which each