Main Content

matlab.project.createProject

Create blank project

Description

example

proj = matlab.project.createProject creates and opens a blank project and returns the project object. Use the project object to manipulate the new project at the command line. The new project is created in the default project folder.

example

proj = matlab.project.createProject(path) creates the project in the specified folder.

example

proj = matlab.project.createProject(name) creates the project in the default folder, with the specified name.

Examples

collapse all

Create a blank project in the default project folder and specify the project name. After the project is created, you can set up the project by adding files to the project, configuring the project path, and specifying startup and shutdown files.

proj = matlab.project.createProject;
proj.Name = "My New Project";

Create a blank project in the specified folder and specify the project name.

proj = matlab.project.createProject("C:\work\myprojectname");

Create a blank project in the default project folder with the specified name.

proj = matlab.project.createProject("myprojectname");

Input Arguments

collapse all

New project path, specified as a character vector or string scalar. If you do not specify the path, matlab.project.createProject creates the project in the default location. You can change the default location in the project preferences.

New project name, specified as a character vector or string scalar.

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.

Tips

  • To change the default folder for new projects, on the Home tab, in the Environment section, click Preferences. Go to MATLAB > Project and in the New Projects section, set the Default folder.

Introduced in R2019a