Algorithm for expfn function, MATLAB in Engineering

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 random value for the number of terms n (an alternative technique would be to prompt the user for this).
  •  Call a subfunction appex to find an estimated value of exp(x) by using a series with n terms.
  •  Prints this estimated value.

 

Posted Date: 10/19/2012 8:34:52 AM | Location : United States







Related Discussions:- Algorithm for expfn function, Assignment Help, Ask Question on Algorithm for expfn function, Get Answer, Expert's Help, Algorithm for expfn function Discussions

Write discussion on Algorithm for expfn function
Your posts are moderated
Related Questions
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

Function cellplot - Cell array: The function cellplot place a graphical display of the cell array in a figure Window; though, it is a high-level view and fundamentally just di

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

Print from the structure: To print from the structure, a disp function will show either the whole structure or a field. >> disp(package) item_no: 123 cost: 19.99

Creating the structure Variables: Creating a structure variable can be accomplished by simply storing the values in fields by using assignment statements, or by using the stru


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

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,

Changing Case: The MATLAB has two functions which convert strings to all uppercase letters, or all lowercase, known as the upper and lower. >> mystring = 'AbCDEfgh';

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