rmpath - Remove folders from search path - MATLAB (original) (raw)

Main Content

Remove folders from search path

Syntax

Description

rmpath([folderName1,...,folderNameN](#btpb982-1-folderName)) removes the specified folders from the search path. If you specify a set of multiple folders separated by path separators, then each of the specified folders is removed.

example

oldpath = rmpath([folderName1,...,folderNameN](#btpb982-1-folderName)) returns the path prior to removing the specified folders.

Examples

collapse all

Remove /usr/local/matlab/mytools and/project/functions from the search path.

rmpath("/usr/local/matlab/mytools","/project/functions")

Input Arguments

collapse all

Folder names to remove from the search path, specified as one or more character vectors or string scalars. Use the full pathname for each folder.

Example: "c:\matlab\work"

Example: "/home/user/matlab","/home/user/matlab/test"

MATLABĀ® resolves all pathnames containing '.', '..', and symbolic links to their target location before removing them from the path. For example, if you specify c:\matlab\..\work, MATLAB removes the folder c:\work from the path.

Data Types: char | string

Version History

Introduced before R2006a