Example of exponential function modular program, MATLAB in Engineering

Example of Exponential function modular program:

In order to view the distinction in the approximate value for e as n increases, the user kept choosing Limit & entering larger and larger values each time in the illustration below:

>> eapplication

Enter a positive integer for n: 4

An approximation of e with n = 4 is 2.44

Enter a positive integer for n: 10

An approximation of e with n = 10 is 2.59

Enter a positive integer for n: 30

An approximation of e with n = 30 is 2.67

Enter a positive integer for n: 100

An appoximation of e with n = 100 is 2.70

In the illustration below, the user

 

  •  Chose Exponential function;

-   Whenever prompted, entered a 4.6 for x.

 

  •  Chose Exponential function again;

-   Whenever prompted, entered a -2.3 for x.

 

  •  Chose the Exit Program.

 

>> eapplication

Please enter a value for x: 4.6

Value of built-in exp(x) is 99.48

Approximate exp(x) is 98.71

Please enter a value for x: -2.3

Value of built-in exp(x) is 0.10

Approximate exp(x) is 0.10

Posted Date: 10/19/2012 8:42:20 AM | Location : United States







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

Write discussion on Example of exponential function modular program
Your posts are moderated
Related Questions
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

Evaluating a string: The function eval is used to compute a string as a function. For illustration, below is the string 'plot(x)'is interpreted to be a call to plot the functi

Vectors of Structures: In numerous applications, involving database applications, information generally would be stored in the vector of structures, instead of in individual s

1. Write a MATLAB function (upperTriangle) using the functions you previously created to convert a matrix to upper triangular form. Start with row 1, column1. Find the row that has

Replacement : Replace a row by adding it to (or subtract from it) a multiple of the other row. For a given row ri, this is written as   ri  - srj →  ri Note that when r

num2str function: The num2str function, that converts real numbers, can be called in many ways. If only the real number is passed to the num2str function, it will generate a s

Matrix definitions: As we know the matrix can be thought of as a table of values in which there are both rows and columns. The most common form of a matrix A (that is sometime

calcrectarea subfunction: function call: area = calcrectarea(len,wid); function header: function area = calcrectarea(len, wid)   In the function call, the two arg

Examine exponential function: The algorithm for the main script program is shown below:  Call a function eoption to show the menu and return the user's choice.  Loop

I have a 400x2 vel.dat and 20x2 xy.dat file, how can i plot a streamslice graph on matlab with this two files.