Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

matlab.addons.toolbox.packageToolbox

Package toolbox project

Syntax

matlab.addons.toolbox.packageToolbox(projectFile)
matlab.addons.toolbox.packageToolbox(projectFile,outputFile)

Description

example

matlab.addons.toolbox.packageToolbox(projectFile) packages the toolbox project file (.prj file) into a MATLAB® toolbox file (.mltbx file) of the same name. 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

Was this topic helpful?