Add folder to path of Simulink project
folderpath = addPath(project, folder)
sldemo_slproject_airframe; project = simulinkproject;
Create a new folder.
folderpath = fullfile(project.RootFolder,'folder'); mkdir(filepath);
Add this new folder to the project.
projectFile = addFile(project,folderpath);
Add this new folder to the project path.
folderpath = addPath(project,folderpath);
Project, specified as a project object. Use
simulinkproject to create a project
object to manipulate a Simulink project at the command line.
folder— Path of folder
Path of the folder to add relative to the project root folder, specified as a character vector. The folder must be within the root folder.
folderpath— Path folder
Path folder object containing the specified folder path. The project puts the folders on the MATLAB search path when it loads and removes them from the path when it closes.