User`s guide
R2011a
9-16
The following example shows such a statement case and part of the resulting warning:
simulink.badname
Warning: Direct access of structure fields returned by a
function call (e.g., call to simulink) is not allowed. ...
In addition to being misleading, handling this case with merely a warning also allows the
function (simulink, in this case) to execute, regardless of the fact that the name to the
right of the dot is invalid.
In MATLAB version 7.12 (R2011a), this type of statement throws an error. The text of
the error message is:
simulink.badname
??? Undefined variable "simulink" or function "simulink.badname".
Compatibility Considerations
Any such statements in your code that have only generated a warning message in
past releases will now throw an error. Any such error that is not caught and handled
appropriately will terminate the function in which it occurs. MathWorks recommends
that you replace the unrecognized name to the right of the dot with the correct name.
This change also affects the output of the lasterror function if you attempt to access any
field value (message, identifier, or stack) directly. Earlier versions of MATLAB
generate a warning:
lasterror.message
Warning: Direct access of structure fields returned by a
function call (e.g., call to lasterror) is not allowed. ...
This and future versions throw an error:
lasterror.message
??? Undefined variable "lasterror" or function "lasterror.message".
Regular Expressions Support Zero-Length Matching
Regular expressions in MATLAB now support successful zero-length matching. See the
documentation on Empty Match mode in the description of Command Options for the
regexp function.