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
Illustration of Vectors of structures: In this illustration, the packages are vector which has three elements. It is shown as a column vector. Each and every element is a stru

Simplification Functions: There are numerous functions which work with expressions, and simplify the terms. Not all the expressions can be simplified, but the simplify functio

Illustration of Set operations: For illustration, given the vectors as shown below: >> v1 = 2:6 v1 = 2  3  4  5  6 >> v2 = 1:2:7 v2 = 1  3  5  7

Comparing strings: There are few functions which compare strings and return logical true when they are equivalent or logical false when not. The function strcmp compares the s

Finding a sting - function findstr: The function findstr receives two strings as input arguments. It finds all the occurrences of shorter string contained by the longer, and r

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

Matrix solutions to systems of the linear algebraic equations: The linear algebraic equation is an equation of the form a 1 x 1 + a 2 x 2 + a 3 x 3    .  .  .  .  a n x n

Forward elimination: In forward elimination, we want to obtain a 0 in the a 21 position. To accomplish this, we can alter the second line in the matrix by subtracting from it

Illustration of anonymous functions: Dissimilar functions stored in the M-files, when no argument is passed to an anonymous function, the parentheses should still be in the fu

ischar function: The ischar function return the logical true if an array is a character array, or logical false if not. >> vec = 'EK127'; >> ischar(vec) ans =