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
Set Operations: The MATLAB has numerous built-in functions which perform set operations on vectors. These involve intersect, union, setdiff, unique, and setxor. All these func


Inverse of square matrix: The inverse is, hence the result of multiplying the scalar 1/D by each and every element in the preceding matrix. Note that this is not the matrix A,


Subfunctions: Though, it is possible to have more than one function in a given M-file. For illustration, if one function calls the other, the first function would be the prima

. Generate the following signal, x(n)=1+cos((25*pi*n)/100),0 Compute the DTFT of x[n] for w=0:0.01:2*pi Plot the Real part, imaginary part, the amplitude and phas

Algorithm for the function e: The algorithm for the function eoption is as shown: Use the menu function to show the 4 choices. Error-check (an error would take place

Creating Cell arrays: There are many ways to create cell arrays. For illustration, we will create a cell array in which one element will store an integer, one element store ch

Execution steps: Whenever the program is executed, the steps below will take place: The script calcandprintarea starts executing. The calcandprintarea calls the readr

IS Functions in Matlab: There are many functions which are built into MATLAB which test whether or not something is true; these function names start with the word is. As these