1
Built-in function
2
MEX-function
3
Simulink model files that are not loaded, with file types in this order:
a
SLX file
b
MDL file
4
Stateflow
®
chart with a .sfx extension
5
App file (.mlapp) created using MATLAB App Designer
6
Program file with a .mlx extension
7
P-file (that is, an encoded program file with a .p extension)
8
Program file with a .m extension
For example, if MATLAB finds a .m file and a P-file with the same name in the same folder, it uses the
P-file. Because P-files are not automatically regenerated, make sure that you regenerate the P-file
whenever you edit the program file.
To determine the function MATLAB calls for a particular input, include the function name and the
input in a call to the which function.
Change in Rules For Function Precedence Order
Starting in R2019b, MATLAB changes the rules for name resolution, impacting the precedence order
of variables, nested functions, local functions, and external functions. For information about the
changes and tips for updating your code, see “Update Code for R2019b Changes to Function
Precedence Order” on page 20-40.
• Identifiers cannot be used for two purposes inside a function
• Identifiers without explicit declarations might not be treated as variables
• Variables cannot be implicitly shared between parent and nested functions
• Change in precedence of compound name resolution
• Anonymous functions can include resolved and unresolved identifiers
The behavior of the import function has changed.
• Change in precedence of wildcard-based imports
• Fully qualified import functions cannot have the same name as nested functions
• Fully qualified imports shadow outer scope definitions of the same name
• Error handling when import not found
• Nested functions inherit import statements from parent functions
See Also
import
More About
•
“What Is the MATLAB Search Path?”
20 Function Basics
20-38
Built-in function
2
MEX-function
3
Simulink model files that are not loaded, with file types in this order:
a
SLX file
b
MDL file
4
Stateflow
®
chart with a .sfx extension
5
App file (.mlapp) created using MATLAB App Designer
6
Program file with a .mlx extension
7
P-file (that is, an encoded program file with a .p extension)
8
Program file with a .m extension
For example, if MATLAB finds a .m file and a P-file with the same name in the same folder, it uses the
P-file. Because P-files are not automatically regenerated, make sure that you regenerate the P-file
whenever you edit the program file.
To determine the function MATLAB calls for a particular input, include the function name and the
input in a call to the which function.
Change in Rules For Function Precedence Order
Starting in R2019b, MATLAB changes the rules for name resolution, impacting the precedence order
of variables, nested functions, local functions, and external functions. For information about the
changes and tips for updating your code, see “Update Code for R2019b Changes to Function
Precedence Order” on page 20-40.
• Identifiers cannot be used for two purposes inside a function
• Identifiers without explicit declarations might not be treated as variables
• Variables cannot be implicitly shared between parent and nested functions
• Change in precedence of compound name resolution
• Anonymous functions can include resolved and unresolved identifiers
The behavior of the import function has changed.
• Change in precedence of wildcard-based imports
• Fully qualified import functions cannot have the same name as nested functions
• Fully qualified imports shadow outer scope definitions of the same name
• Error handling when import not found
• Nested functions inherit import statements from parent functions
See Also
import
More About
•
“What Is the MATLAB Search Path?”
20 Function Basics
20-38
