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

Reading from a File in a While Loop: Though in most languages the combination of a loop and an if statement would be essential to determine whether or not the elements in a ve

Patch function - graphics objects: The patch function is used to generate a patch graphics object, which is made from 2-dimensional polygons. The patch is defined by its verti

Displaying expressions: The good-looking function will show such expressions by using exponents; for illustration, >> b = sym('x^2') b = x^2 >> pretty(b)

Example of file ploting data: As the other example, a data file called 'compsales.dat' stores the sales figures (in millions) for divisions in a company. Each line in the f

I have a frequency response data. How do I convert that to state space? I am given a 6 row and 3 column data (steady state). How do i convert that to state space model?

Function used in binary search: The function below implements this binary search algorithm. It receives two arguments: the sorted vector and a key (on the other hand, the func

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

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

Comparing strings: There are few functions which compare strings and return logical true when they are equivalent or logical false when not. The function strcmp compares the s