Main Content

matlabRelease

Current MATLAB release information

Description

Use matlabRelease to query and store release information of the current MATLAB® version. After you create a matlabRelease object you can access specific property values using dot-indexing:

releaseInfo = matlabRelease;
releaseInfo.Release
ans =
  "R2020b"

matlabRelease only returns information about the MATLAB installation. To query toolbox version, use ver. To query licensing information use license.

Creation

Description

example

releaseInfo = matlabRelease returns a matlabRelease object with MATLAB release information. The matlabRelease object contains information about the release, release stage, update release number, and release date.

Properties

expand all

This property is read-only.

Release name, returned as a string scalar. Some example release names are: "R2020b", "R2015a", and "R2006a".

Data Types: string

This property is read-only.

Release stage, returned as a string scalar of "prerelease" or "release". The release stage indicates whether the MATLAB release is a prerelease version.

Data Types: string

This property is read-only.

Update release number, returned as a string scalar. MATLAB releases are released every 6 months and subsequently updated each month after the initial release, so the update release number is generally between 0 and 5. Prerelease versions have an update release number of 0.

Data Types: double

This property is read-only.

Release date, returned as a datetime scalar. The release date indicates the date that release was built.

Data Types: datetime

Examples

collapse all

Display MATLAB release information with matlabRelease.

currentRelease = matlabRelease
currentRelease = 
  matlabRelease with properties:

    Release: "R2021a"
      Stage: "release"
     Update: 0
       Date: 17-Feb-2021

Introduced in R2020b