Main Content

openProject

R2026b

Load an existing project

Description

proj = openProject(projectPath) loads the project in the specified file or folder. If any projects are currently open, MATLAB® closes them before loading the specified project. Project startup displays the additional packages and external softwares that will be installed when loading the project, and prompts you for confirmation before proceeding.

example

proj = openProject(projectPath,Prompt=false) does not prompt for confirmation before opening the project.

Examples

collapse all

Open an existing project from a folder called "C:/projects/project1/".

proj = openProject("C:/projects/project1/")

Input Arguments

collapse all

Project you want to load, specified as a character vector or string scalar that represents the full path to the project .prj file or project root folder.

Alternatively, specify the project as a matlab.project.Project object. (since R2026a)

Example: "C:/projects/project1/myProject.prj"

Example: "C:/projects/project1/"

Since R2026b

Option to prompt confirmation before loading the project, specified as true, false, or as numeric or logical 1 (true) or 0 (false).

Output Arguments

collapse all

Project, returned as a matlab.project.Project object. Use the matlab.project.Project object to programmatically manipulate the currently open project.

Version History

Introduced in R2019a

expand all