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
Dot Product: The dot or inner product of two vectors a and b is written as a • b and is defined as  In another words, this is like matrix multiplication when multiplyi

Passing arguments to functions: In all these functions examples faraway, at least one of the arguments was passed in the function call to be the value(s) of the equivalent inp

Reading from a File in a While Loop: Though in most languages the combination of a loop and an if statement would be essential to determine whether or not the elements in a ve

Example of Plotting from a Function: For illustration, the function can be called as shown below:      >> y = [1:2:9].^3      y =     1  27  125  343  729

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

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

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

Sound Files: The sound signal is an illustration of a continuous signal which is sampled to result in a discrete signal. In this situation, sound waves traveling through the a

Illustration of initializing the data structure: illustration of initializing the data structure by preallocating is here as shown: >> cyls(3) = struct('code', 'c', 'dimen

Expanding a function: The expand function will multiply out terms, and factor will do the opposite: >> expand((x+2)*(x-1)) ans = x^2 x-2 >> factor(ans)