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.installToolbox

Install toolbox file

Syntax

installedToolbox = matlab.addons.toolbox.installToolbox(toolboxFile)
installedToolbox = matlab.addons.toolbox.installToolbox(toolboxFile,agreeToLicense)

Description

example

installedToolbox = matlab.addons.toolbox.installToolbox(toolboxFile) installs the toolbox file (.mltbx file) specified by toolboxFile and returns information about the toolbox.

example

installedToolbox = matlab.addons.toolbox.installToolbox(toolboxFile,agreeToLicense) accepts the license agreement before installing the toolbox if agreeToLicense is true.

Examples

collapse all

Assume that you have the myToolbox.mltbx toolbox file in your current working folder. Install the toolbox.

toolboxFile = 'MyToolbox.mltbx';
installedToolbox = matlab.addons.toolbox.installToolbox(toolboxFile)
installedToolbox = 

       Name: 'myToolbox'
    Version: '2.0'
       Guid: 'd0169b4a-fe74-463f-981a-26160c94cbe5'

If the toolbox contains a licenses agreement, a dialog box opens to prompt you to agree to the license before installation.

Assume that you have the myToolbox.mltbx toolbox file in your C:\Downloads\ folder, and that the toolbox contains a license agreement. Install the toolbox and prevent MATLAB® from opening the license agreement dialog box by indicating you accept the license.

toolboxFile = 'MyToolbox.mltbx';
agreeToLicense = true;
installedToolbox = matlab.addons.toolbox.installToolbox(toolboxFile,agreeToLicense)
installedToolbox = 

       Name: 'myToolbox'
    Version: '2.0'
       Guid: 'd0169b4a-fe74-463f-981a-26160c94cbe5'

Input Arguments

collapse all

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

Example: toolboxFile = 'myToolbox.mltbx'

Example: toolboxFile = "C:\Work\myOtherToolbox.mltbx"

Indicator to accept license agreement, specified as false or true. By default, agreeToLicense is false. If a toolbox contains a license agreement:

  • If agreeToLicense is false, then MATLAB displays a dialog box where you can accept the license or cancel installation.

  • If agreeToLicense is true, then MATLAB installs the toolbox without opening the license agreement dialog box. By setting agreeToLicense to true, you accept the terms of the license agreement. Be sure that you have reviewed the license agreement before installing the toolbox.

If a toolbox does not have a license agreement, the value of agreeToLicense has no effect on installation.

Data Types: logical

Output Arguments

collapse all

Information about the installed toolbox, returned as a structure. The structure has the following fields.

FieldDescription
NameName of the toolbox
VersionToolbox version
GuidUnique toolbox identifier

Alternatives

You can install toolboxes from the Add-On Explorer UI. For more information, see Get Add-Ons.

Introduced in R2016a

Was this topic helpful?