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
Referring to and Showing Cell Array Elements and Attributes: Just as with the other vectors, we can refer to individual elements of the cell arrays. The only difference is tha

. 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

Interchange rows : for illustration interchanging rows ri and rj is written as

Removing Whitespace Characters: The MATLAB has functions which will eliminate trailing blanks from the end of a string and/or leading blanks from the starting of a string.

Program of passing arguments to functions: This was an illustration of a function which did not receive any input arguments nor did it return any output arguments; it easily a

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

Sorting Vectors of structures: Whenever working with vector of structures, it is very common to sort based on a particular field within the structures. For illustration, recal

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

Finding a sting - function strfind: The function strfind does necessarily similar thing, except that the order of the arguments does make dissimilarity. The common form is str

Algorithm for expfn function: The algorithm for expfn function is as shown:  receives the value of x as the input argument.  Prints the value of exp(x).  assigns a