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
Program to Counting in a while loop: The script initializes variable counter to 0. Then, in the while loop action, each and every time the user successfully enter a number, th

Plotting from a Function: The following function creates a Figure Window as shown in figure, which shows various types of plots for similar y vector. The vector is passed as a

Executing a program: Running the program would be completed by typing the name of the script; this would call the other functions: >> calcandprintarea Whenever prompt

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

Symbolic Variables and expressions: The MATLAB has a type known as sym for the symbolic variables and expressions; these work with strings. The illustration, to generate a sym

Examine exponential function: The algorithm for the main script program is shown below:  Call a function eoption to show the menu and return the user's choice.  Loop

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

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,

Intersect function and setdiff function: The intersect function rather than returns all the values which can be found in both of the input argument vectors. >> intersect(v

Matrix definitions: As we know the matrix can be thought of as a table of values in which there are both rows and columns. The most common form of a matrix A (that is sometime