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