Maximum identifier length
len = namelengthmax
Structure field names
Script, function, and class names
Rather than hard-coding a specific maximum name length into your programs, use the namelengthmax function. This saves you the trouble of having to update these limits should the identifier length change in some future MATLAB release.