<< isfunction_handle function_handle functions

str2func


Returns a function handle from a string.


Syntax


func_handle = str2func(str)

Input argument


str

a string

Output argument


func_handle

a function handle.

Description


function_handle = str2func(str) returns a function handle function_handle for the function named in the string str

Example


fh = str2func('cos')
str = func2str(fh)

See also


func2str, isfunction_handle.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< isfunction_handle function_handle functions