uses of function handlesthe function handles can


Uses of Function handles:

The Function handles can also be generated for functions other than anonymous functions, both built-in & user-defined functions. For illustration, the below would generate a function handle for the built-in factorial function:

>> facth = @factorial;

The @ operator acquiires the handle of the function, that is then stored in a variable facth.

The handle can be used to call the function, merely like the handle for the anonymous functions, for illustration:

>> facth(5)

ans =

120

By using the function handle to call the function rather than of using the name of the function does not itself elaborate why this is helpful, so a clear question would be why the function handles are essential.

 

Request for Solution File

Ask an Expert for Answer!!
Applications of MATLAB: uses of function handlesthe function handles can
Reference No:- TGS0175143

Expected delivery within 24 Hours