matlab.addons.toolbox.packageToolbox

Package toolbox project

Description

example

matlab.addons.toolbox.packageToolbox(projectFile) packages the toolbox project file (.prj file) into a MATLAB® toolbox file (.mltbx file). The name of the resulting MATLAB toolbox file is the name of the toolbox appended with the .mltbx extension. For example, toolboxname.mltbx.

For you to package a toolbox, the toolbox root folder and the toolbox files must be in the same location as when you created the toolbox project file.

example

matlab.addons.toolbox.packageToolbox(projectFile,outputFile) packages the toolbox and saves the .mltbx file with the name and location specified by outputFile.

Examples

collapse all

Assume that you have the myToolbox.prj toolbox project file in your current working folder. Package the toolbox in the same folder.

projectFile = 'myToolbox.prj';
matlab.addons.toolbox.packageToolbox(projectFile)

Assume that you have the myToolbox.prj toolbox project file in your current working folder. Package the toolbox as myFavoriteToolbox.mltbx.

projectFile = 'myToolbox.prj';
outputFile = 'myFavoriteToolbox';
matlab.addons.toolbox.packageToolbox(projectFile,outputFile)

Input Arguments

collapse all

Name of the toolbox project file (.prj file), specified as a character vector or string scalar. The name includes the relative or absolute path to the file.

Example: projectFile = 'myToolbox.prj'

Example: projectFile = "C:\Work\myOtherToolbox.prj"

Name of the output MATLAB toolbox file (.mltbx file), specified as a character vector or string scalar. The name includes the relative or absolute path to the file. If the value of outputFile does not contain the .mltbx extension, the packageToolbox function appends the extension.

Example: outputFile = "myToolbox.mltbx"

Example: outputFile = 'C:\Work\myOtherToolbox'

Alternatives

You can package toolboxes from the Package a Toolbox UI. For more information, see Create and Share Toolboxes.

Introduced in R2016a