23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>MATLAB</strong> Path<br />

<strong>MATLAB</strong> Path<br />

This section covers the following topics:<br />

• “Precedence Rules” on page 12-35<br />

• “File Precedence” on page 12-36<br />

• “Adding a Directory to the Search Path” on page 12-36<br />

• “Handles to Functions Not on the Path” on page 12-36<br />

• “Making Toolbox File Changes Visible to <strong>MATLAB</strong>” on page 12-37<br />

• “Making Nontoolbox File Changes Visible to <strong>MATLAB</strong>” on page 12-38<br />

• “Change Notification on Windows” on page 12-38<br />

Precedence Rules<br />

When <strong>MATLAB</strong> is given a name to interpret, it determines its usage by<br />

checking the name against each of the entities listed below, and in the order<br />

shown:<br />

1 Variable<br />

2 Subfunction<br />

3 Private function<br />

4 Class constructor<br />

5 Overloaded method<br />

6 M-file in the current directory<br />

7 M-file on the path, or <strong>MATLAB</strong> built-in function<br />

If you have two or more M-files on the path that have the same name,<br />

<strong>MATLAB</strong> selects the function that has its M-file in the directory closest to the<br />

beginning of the path string.<br />

For more information: See “Function Precedence Order” on page 9-73 in<br />

the <strong>MATLAB</strong> <strong>Programming</strong> documentation.<br />

12-35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!