Main Content

matlabRelease

Current MATLAB release information

Since R2020b. Recommended over ver.

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 licensing information use license.

Creation

Description

releaseInfo = matlabRelease returns information about the current MATLAB release, release stage, update release number, and release date as a matlabRelease object.

example

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: "R2024b"
      Stage: "release"
     Update: 0
       Date: 22-Aug-2024

Version History

Introduced in R2020b