Main Content

matlabshared.supportpkg.getSupportPackageRoot

Get root folder of support packages

Description

example

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

Examples

collapse all

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

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

Useget万博1manbetxSupportPackageRootto 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\释放

  • Linux®andmacOS/home/user/Documents/MATLAB/SupportPackages/释放

释放is the current MATLAB release anduseris your Linux andmacOSuser 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 folderC:\ProgramData\MATLAB\SupportPackages\R2021aexists and is not empty, MATLAB sets the root folder toC:\ProgramData\MATLAB\SupportPackages\R2021a_1by default.

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

Data Types:char

Version History

Introduced in R2016a