MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

(^8) Loaded Simulink® models
(^9) Functions in the current folder
(^10) Functions elsewhere on the path, in order of appearance
When determining the precedence of functions within the same folder, MATLAB considers
the file type, in this order:
(^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) App file (.mlapp) created using MATLAB App Designer
(^5) Program file with a .mlx extension
(^6) P-file (that is, an encoded program file with a .p extension)
(^7) 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.
See Also
More About



  • “What Is the MATLAB Search Path?”

  • Variables on page 1-5

  • “Types of Functions” on page 20-20

  • “Class Precedence and MATLAB Path”


20 Function Basics

Free download pdf