Main Content

matlabshared.supportpkg.getSupportPackageRoot

Get root folder of support packages

Description

example

installDir = matlabshared.supportpkg.getSupportPackageRoot gets root folder of the current support packages. MATLAB® installs all support packages to this location.

Examples

collapse all

Use the setSupportPackageRoot function to change the installation folder for support packages. You need administrative privileges to use this function.

matlabshared.supportpkg.setSupportPackageRoot('C:\MATLAB\CustomSupportPackageRoot')

Use getSupportPackageRoot to check that the change was successful.

matlabshared.supportpkg.getSupportPackageRoot
ans =

C:\MATLAB\CustomSupportPackageRoot

Output Arguments

collapse all

Root folder of support packages, returned as a character vector.

The default location of the root folder is platform specific:

  • Windows®C:\ProgramData\MATLAB\SupportPackages\release

  • Linux® and macOS/home/user/Documents/MATLAB/SupportPackages/release

release is the current MATLAB release and user is your Linux and macOS user name.

If a folder exists at the default location and is not empty, MATLAB sets the root folder location to the default location appended with _n. For example, on a Windows system running MATLAB R2021a, if the folder C:\ProgramData\MATLAB\SupportPackages\R2021a exists and is not empty, MATLAB sets the root folder to C:\ProgramData\MATLAB\SupportPackages\R2021a_1 by default.

Example: 'C:\MATLAB\SupportPackage\R2020b'

Data Types: char

Introduced in R2016a