Illustration of function functions, MATLAB Programming

Illustration of Function functions:

For illustration, to pass the sin function into fplot, one would pass its handle as shown in figure for the result.

 239_Illustration of Function functions.png

>> fplot(@sin, [-pi pi])

The fplot function is a good shortcut-it is not essential to generate x and y vectors, and it plots a constant curve instead of the discrete points.

The function feval will compute a function handle and execute the function for the identified argument. For illustration, the below is equivalent to sin(3.2):

>> feval(@sin, 3.2)

ans =

    -0.0584

Posted Date: 10/22/2012 1:12:15 AM | Location : United States







Related Discussions:- Illustration of function functions, Assignment Help, Ask Question on Illustration of function functions, Get Answer, Expert's Help, Illustration of function functions Discussions

Write discussion on Illustration of function functions
Your posts are moderated
Related Questions
The Format Function and ellipsis: The default in MATLAB is to show numbers which have decimal places with four decimal places. The format command can be used to identify the o

Example: Load from File and Plot Data: As illustration, a file known as timetemp.dat stores two lines of data. The first line is the time of the day, and the next line is the

how to find matrix inverse using matlab command

Use Taylor series to derive the form of the truncation error of the approximation Suppose f € C3. Given that the roundo error has the similar form as in the Forward D

I have couple questions in MATLAB I need help in

i need someone to write a matlab code to solve a model.

Implement a single-layer perceptron and train it to translate the digital letters given in the file "pattern1" into the corresponding ASCII representation. Plot a training curve an

An electric overhead traveling crane, consisting of a girder, trolley, and wire rope, is shown in figure. The girder has a flexural rigidity (EI) of 6x10 12 lb.in 2 and a span (L

Example of Hold and legend function: Running this script will generate two individual figure windows. If there is not any other active figure window, the first, that is the ba

Non-Ideal Gas (van der Waals equation):  An equation of state for a non-ideal which is commonly used is the van der Waals equation for 1 mol of gas  P = (R*T)/(V-b) - a/(V^2)