partialpath - Partial pathname description

Description

A partial pathname is the last portion of a full pathname for a file in a directory on the MATLAB search path. Use a partial pathname to locate private and method files, which are usually hidden. You can also use a partial pathname to restrict the search for files to a portion of the path when a file is overloaded, that is, when more than one file with the given name exists in different directories.

A partial pathname consists of the last directory or last several directories of the full pathname, with each directory separated by /, and followed by the filename. For example, matfun/trace, private/cancel, and demos/clown.mat are valid partial pathnames. Specifying the @ in method directory names is optional.

Partial pathnames also make it easy to specify a toolbox or a file in a directory 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: dbclear, dbtype, dbstop, edit, exist, fopen, help, load, type, what, which. The reference page for a function typically specifies if the function accepts partial pathnames.

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

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

Workspace, Search Path, and File Operations in the MATLAB Desktop Tools and Development Environment documentation.

  


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