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

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

Customizing a Plot: Line Types, Color, Marker Types: Plots can be completed in the Command Window, if they are really simple. Though, at many times it is desirable to customiz

Types: Each and every expression, or variable, has a type related with it. The MATLAB supports numerous types of values that are known as classes. A class is necessarily a com

Some recent column source designs incorporate ‘beam steering', where the phase of each element in the column is varied in order to change the angle at which the major lobe appears.

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

256789;267825;625892;982895;598289

use the loop for to produce [-1 -1 -1 -1; 0 -1 -1 -1; 0 0 -1 -1; 0 0 0 -1]

Your task is to implement the PHYSAT algorithm in Matlab to classify the phytoplankton species in the data you have selected. An algorithm demonstrating one solution is provided b

Problem 1. Create a vector representing x coordinates of a measurement with 20 points between 0 and 10. Create another vector y representing fake measurements which are related to