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
Passing Multiple Arguments: In many situaion it is essential to pass more than one argument to the function. For illustration, the volume of a cone is given by here r


Scripts to Produce and Customize the Simple Plots: The MATLAB has many graphing capabilities. In most cases, customizing plots are desired and this is the simplest to accompli

Size function - Dimensions of matrix: For the matrix mat shown next, it has three rows and two columns, therefore the size is 3 × 2. The length is the larger dimension that is

How do I compute and plot a temperature profile along the x axis from -6 to 6 given the equation for steady state heat conduction and boundary conditions

Introduction to File Input/output (LOAD and SAVE): In most cases, the input to a script will come from a data file which has been generated by the other source. It is also use

drow midpoint circle for scan converting acircle in matlab

Command Window: To the left of the Command Window, there are 2 tabs for the Current Directory Window and Workspace Window. If the Current Directory tab is selected, the files


Ant Colony Optimization for Optimization of Route path taken Ant Colony Algorithm is a potential candidate for coupled, 3D optimisation. Ant Colony Algorithm enjoys the overall