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
Function strncmp: The function strncmp compares only the first n characters in the strings and ignores the rest. The initial two arguments are strings to compare, and third ar

Preallocating a Vector: There are necessarily two programming techniques that can be used to simulate the cumsum function. One technique is to begin with an empty vector and c

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

Calling of Function polyval: The curve does not appear very smooth on this plot, but that is as there are only five points in the x vector. To estimate the temperature

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

Tracing of Square matrices: The trace of a square matrix is the addition of all the elements on the diagonal. For illustration, for the preceding matrix it is 1 + 6 + 11 + 16,

I dont know how to input different videos on matlab program

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

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

Function issorted - set operations: The function issorted will return 1 for logical true when the argument is sorted in ascending order (minimum to maximum), or 0 for false wh