matlab.addons.toolbox.installToolbox - Install toolbox file - MATLAB (original) (raw)
Main Content
Syntax
Description
[installedToolbox](#bu581%5F0-installedToolbox) = matlab.addons.toolbox.installToolbox([toolboxFile](#bu581%5F0-toolboxFile))
installs the toolbox file (.mltbx
file) specified by toolboxFile
and returns information about the toolbox.
MATLABĀ® installs the toolbox in the default add-on installation folder. For more information including how to change the default add-on installation folder, seeGet and Manage Add-Ons.
[installedToolbox](#bu581%5F0-installedToolbox) = matlab.addons.toolbox.installToolbox([toolboxFile](#bu581%5F0-toolboxFile),[agreeToLicense](#bu581%5F0-agreeToLicense))
accepts the license agreement before installing the toolbox if agreeToLicense
is true
.
Examples
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 = 'C:\Downloads\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
Indicator to accept license agreement, specified as false
or true
. By default, agreeToLicense
is false
. If a toolbox contains a license agreement:
- If
agreeToLicense
isfalse
, then MATLAB displays a dialog box where you can accept the license or cancel installation. - If
agreeToLicense
istrue
, then MATLAB installs the toolbox without opening the license agreement dialog box. By settingagreeToLicense
totrue
, 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
Alternatives
You can install toolboxes from the Add-On Explorer UI. For more information, see Get and Manage Add-Ons.
Version History
Introduced in R2016a