Manage MATLAB versions for cross-release code integration
registers a MATLAB version. The function specifies the folder where the MATLAB version is installed. The function checks that the folder corresponds
matlabroot value for a valid installation, retrieves the
MATLAB version number, and stores this information as a preference.
deregisters the MATLAB version and removes installation folder and version data.
This code shows how you can register a previous release for your cross-release code integration workflow.
[registeredMATLABs, installationFolders] = sharedCodeMATLABVersions; requiredVersion = 'R2017a'; typicalPath = 'C:\Program Files\MATLAB'; if isempty(registeredMATLABs) || ~any(strcmp(requiredVersion, registeredMATLABs)) versionFolder = fullfile(typicalPath, requiredVersion); sharedCodeMATLABVersions('Folder', versionFolder); end
versionInstallationFolder— Installation folder location
Full path to the installation folder for the MATLAB version that you want to register.
deregisterVersion— Release version to deregister
MATLAB version that you want to deregister.
registeredVersions— Registered release versions
MATLAB release versions that are registered by the function.
installationFolders— Installation folder paths
Installation folder locations for registered MATLAB versions.