Programming and Data Types | ![]() ![]() |
Maximum Length of a Function Name
Function names used in handles are unique up to 31 characters. If the function name exceeds that length, MATLAB truncates the latter part of the name.
fhandle = @function_name_that_exceeds_thirty_one_characters fhandle = @function_name_that_exceeds_thir
For function handles created for Java constructors, the length of any segment of the package name or class name must not exceed 31 characters. (The term segment refers to any portion of the name that lies before, between, or after a dot. For example, there are three segments in java.lang.String.) There is no limit to the overall length of the string specifying the package and class.
The following statement is valid, even though the length of the overall package and class specifier exceeds 31 characters.
fhandle = @java.awt.datatransfer.StringSelection
![]() | Constructing a Function Handle | Evaluating a Function Through Its Handle | ![]() |