This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

removeFile

(Not recommended) Remove file from project

simulinkproject is not recommended. Use currentProject or openProject instead. For more information, see Compatibility Considerations.

Syntax

removeFile(proj,file)

Description

example

removeFile(proj,file) removes a file from the project proj.

Examples

collapse all

Open the airframe project and create a project object.

sldemo_slproject_airframe;
proj = simulinkproject;

Remove a file.

removeFile(proj,'models/AnalogControl.mdl')

Add the file back to the project.

addFile(proj,'models/AnalogControl.mdl')

Input Arguments

collapse all

Project, specified as a project object. Use simulinkproject to create a project object to manipulate a project at the command line.

Path of the file to remove relative to the project root folder, including the file extension, specified as a character vector or a file object returned by findFile. The file must be in the project.

Example: 'models/myModelName.slx'

Compatibility Considerations

expand all

Not recommended starting in R2019a

See Also

Functions

Introduced in R2013a