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
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

Appending variables to the Mat-File: Appending to the file adds to what has been saved in a file, and is accomplished by using the -append option. For illustration, supposing

Help command: The help command is used with the script rectarea, the function readlenwid, and the major function printrectarea. To see the first comment in the subfunction, as

Algorithm for subfunction: The algorithm for subfunction askforn is as shown:  Prompt the user for the positive integer n.  Loop to print an error message and reprom

Sorting Vectors of structures: Whenever working with vector of structures, it is very common to sort based on a particular field within the structures. For illustration, recal

function imread: The function imread can read an image file, for illustration a JPEG (.jpg) file. The function reads color images into a 3-dimensional matrix. >> myimage1

calcrectarea subfunction: function call: area = calcrectarea(len,wid); function header: function area = calcrectarea(len, wid)   In the function call, the two arg

Technique to create Nested structures: This technique is the most proficient. Though, the other technique is to build the nested structure one field at a time. As this is a ne

Gauss Elimination: The Gauss elimination technique consists of:    Generating the augmented matrix [A b]    Applying EROs to augmented matrix to obtain an upper trian

deblank function: The deblank function eliminates only trailing blanks from the string, not leading the blanks. The strtrim function will eliminate both the leading and traili