Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 10: Advanced Functions > Variable Numbers of Arguments - Pg. 327

306 CHAPTER 10 Advanced Functions 1 0.8 0.6 0.4 0.2 0 ­0.2 ­0.4 ­0.6 ­0.8 ­1 ­3 ­2 ­1 0 1 2 3 The function feval will evaluate a function han- dle and execute the function for the specified argument. For example, the following is equiva- lent to sin(3.2): >> feval(@sin, 3.2) ans ¼ À0.0584 10.3 VARIABLE NUMBERS OF ARGUMENTS The functions that we've written thus far contain a fixed number of input and output arguments. For example, in the following function that we have de- fined previously, there is one input argument and two output arguments: FIGURE 10.2 Plot of sin created using fplot areacirc.m