Main Content

matlab.addons.toolbox.packageToolbox

Package toolbox project

Description

example

matlab.addons.toolbox.packageToolbox(projectFile)packages the toolbox project file (.prjfile) into a MATLAB®toolbox file (.mltbxfile). The name of the resulting MATLAB toolbox file is the name of the toolbox appended with the.mltbxextension. 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.mltbxfile with the name and location specified byoutputFile.

Examples

collapse all

Assume that you have themyToolbox.prjtoolbox 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 themyToolbox.prjtoolbox project file in your current working folder. Package the toolbox asmyFavoriteToolbox.mltbx.

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

Input Arguments

collapse all

Name of the toolbox project file (.prjfile), 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 (.mltbxfile), specified as a character vector or string scalar. The name includes the relative or absolute path to the file. If the value ofoutputFiledoes not contain the.mltbxextension, thepackageToolboxfunction 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, seeCreate and Share Toolboxes.

版本历史

Introduced in R2016a