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

Splits a string : The strtok function splits a string into pieces; it can be called in many ways. The function receives one string as an input argument. It appears for the fir

Replacing, Finding, and separating strings: There are numerous functions which find and replace the strings, or parts of strings, within the other strings and functions which

Anonymous Functions: The anonymous function is a very easy, one-line function. The benefit of an anonymous function is that it does not have to be stored in an M-file. This ca

i want to run 4 instances of my matlab code on 4 processor cores. im executing the job from head node. i created a parallel job and assigned number of workers. but i don''t get bac

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

Function used in binary search: The function below implements this binary search algorithm. It receives two arguments: the sorted vector and a key (on the other hand, the func


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

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