partialpath - Partial pathname description

Description

A partial pathname is a pathname relative to the MATLAB® path, matlabpath. It is used to locate private and method files, which are usually hidden, or to restrict the search for files when more than one file with the given name exists.

A partial pathname contains the last component, or last several components, of the full pathname separated by /. For example, matfun/trace, private/children, and demos/clown.mat are valid partial pathnames. Specifying the @ in method directory names is optional.

Partial pathnames make it easy to find a toolbox or MATLAB relative files on your path, independent of the location where MATLAB is installed.

Many commands accept partial pathnames instead of a full pathname. Some of these commands are

help, type, load, exist, what, which, edit, dbtype, 
dbstop, dbclear, fopen

Examples

The following example uses a partial pathname:

what graph2d/@figobj

M-files in directory 
matlabroot\toolbox\matlab\graph2d\@figobj

deselectall    enddrag        middrag        subsref
doclick        figobj         set            
doresize       get            subsasgn


P-files in directory 
matlabroot\toolbox\matlab\graph2d\@figobj

deselectall    enddrag        middrag        subsref
doclick        figobj         set
doresize       get            subsasgn

The @ in the class directory name @figobj is not necessary. You get the same response from the following command:

what graph2d/figobj

See Also

fileparts, matlabroot, path

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS