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
Structures: The Structures are data structures which group together values which are logically related in what are known as the fields of structure. The benefit of structures

Individual structure variable: The individual structure variable for one software package may look like this: The name of the structure variable is a package; it has f

Gauss-Jordan: The Gauss-Jordan elimination technique begins in similar way which the Gauss elimination technique does, but then rather than of back-substitution, the eliminati

Function rmfield - structure: The function rmfield eliminates a field from the structure. It returns a new structure with field eliminated, but does not modify the original st

For Loops which do not use an iterator Variable in the action: In all the illustrations that we seen so far, the value of the loop variable has been used in same way in the ac

Technique to creating this structure: An alternative technique of creating this structure, that is not as efficient, includes using the dot operator to refer to fields in the

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

Illustration of Sorting strings: To sort on the rows rather than second dimension should be specified. >> sort(words,2) ans = Hello Hdowy Hi Gbdeo

Creating the structure Variables: Creating a structure variable can be accomplished by simply storing the values in fields by using assignment statements, or by using the stru

Illustration of Variable scope: Running this function does not add any of variables to the workspace, as elaborated: >> clear >> who >> disp(mysum([5 9 1]))