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
A matlab function to calculate filter order

Technique to create Nested structures: This technique is the most proficient. Though, the other technique is to build the nested structure one field at a time. As this is a ne

Plotting File data: It is frequently essential to read data from a file and plot it. Generally, this entails knowing the format of the file. For illustration, let us suppose t

Illustration of Passing arguments to functions: Here is an illustration of calling this function: >> printrand() The random # is 0.94 As nothing is passed to

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


Example of Gauss-jordan: For a 2×2 system, this would results and for a 3 × 3 system, Note that the resulting diagonal form does not involve the right-most col

Illustration of Preallocating a Vector: Illustration of calling the function: >> myveccumsum([5 9 4]) ans =     5  14  18 At the first time in the loop, outvec wil

Binary Search: The binary search supposes that the vector has been sorted first. The algorithm is just similar to the way it works whenever looking for a name in a phone direc

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