matlab.addons.enableAddon - Enable installed add-on - MATLAB (original) (raw)
Main Content
Syntax
Description
matlab.addons.enableAddon([name](#mw%5F42bbdd55-984b-4df0-bdc2-8c11f70c158a))
enables the add-on with the specified name. If multiple versions of an add-on are installed, you must specify a version. Ifmatlab.addons.enableAddon
is unable to find the specified add-on, it displays an error.
You can disable and enable most add-ons from the MATLAB® user community. Disabling and enabling MathWorks® products and support packages is not supported.
matlab.addons.enableAddon([identifier](#d126e1039810))
enables the add-on with the specified identifier.
matlab.addons.enableAddon(___,[version](#mw%5F3f457ba4-2d55-474f-909e-a1a8ab1fd5d8))
also specifies the version of the add-on to enable. Use this syntax with any of the arguments in previous syntaxes.
Examples
Suppose that you have an add-on called Random File Name Creator
installed on your system. Get the list of installed add-ons and enable the Random File Name Creator
add-on.
Get the list of installed add-ons.
addons = matlab.addons.installedAddons
addons =
1×4 table
Name Version Enabled Identifier
___________________________ _________ _______ ______________________________________
"Random File Name Creator" "1.0" false "75442144-f751-4011-bf0e-32b6fb2f1433"
Check to see whether the Random File Name Creator
add-on is disabled. MATLAB confirms that the add-on is disabled.
matlab.addons.isAddonEnabled('Random File Name Creator')
Enable the Random File Name Creator
add-on and confirm that it is enabled.
matlab.addons.enableAddon('Random File Name Creator') matlab.addons.isAddonEnabled('Random File Name Creator')
Suppose that you have versions 2.0
and4.0
of an add-on called My Toolbox
installed on your system. Version 4.0
is enabled. Switch to using version 2.0
of the add-on by enabling version 2.0
.
Get the list of installed add-ons.
addons = matlab.addons.installedAddons
addons =
2×4 table
Name Version Enabled Identifier
___________________________ _________ _______ ______________________________________
"My Toolbox_v4.0" "4.0" true "6de8682e-9c3c-407e-bad7-aa103d738d08"
"My Toolbox" "2.0" false "6de8682e-9c3c-407e-bad7-aa103d738d08"
Enable version 2.0
of My Toolbox
by specifying the second item in the returned list of identifiers. MATLAB enables version 2.0
and disables version4.0
of My Toolbox
.
matlab.addons.enableAddon(addons.Identifier(2),'2.0') addons = matlab.addons.installedAddons
addons =
2×4 table
Name Version Enabled Identifier
___________________________ _________ _______ ______________________________________
"My Toolbox_v4.0" "4.0" false "6de8682e-9c3c-407e-bad7-aa103d738d08"
"My Toolbox" "2.0" true "6de8682e-9c3c-407e-bad7-aa103d738d08"
Input Arguments
Name of the add-on that you want to enable, specified as a character vector or string. To determine the name of an add-on, use thematlab.addons.installedAddons
function.
Unique identifier of the add-on that you want to enable, specified as a character vector or string. To determine the unique identifier of an add-on, use the matlab.addons.installedAddons
function.
Version of the add-on that you want to disable, specified as a character vector or string. To determine the version of an add-on, use thematlab.addons.installedAddons
function.
Version History
Introduced in R2017b