Section: Functions and Scripts
func2str function converts a function pointer into a
string. The syntax is
y = func2str(funcptr)
where funcptr is a function pointer. If funcptr is a
pointer to a function, then y is the name of the function.
On the other hand, if funcptr is an anonymous function then
func2str returns the definition of the anonymous function.
func2str
--> y = @sin y = @sin --> x = func2str(y) x = sinIf we use an anonymous function, then
func2str
returns the definition of the anonymous function
--> y = @(x) x.^2 y = @(x) x.^2 --> x = func2str(y) x = @(x) x.^2