version

Returns the version of the running MATLAB.

Category: Environment and Settings > Platform and License

Syntax

v = version

Version number with build, release name and update level.

v = version('-release')

Only the release, as a text like '2023b'.

[v, d] = version

Also returns the release date.

Description

The plain call returns something like '23.2.0.2409890 (R2023b) Update 3': the version number, the build and the release name. Use the options to get one piece at a time; for comparisons, verLessThan and isMATLABReleaseOlderThan are safer than parsing the text.

The version number of MATLAB R2023b is 23.2.

Input arguments

option
'-release', '-date' or '-java'.

Output arguments

v
Version text.
d
Release date as text.

Example

Version, release and date

version
version('-release')
[v, d] = version
Output
ans = '23.2.0.2409890 (R2023b) Update 3'
ans = '2023b'
v = '23.2.0.2409890 (R2023b) Update 3'
d = 'October 4, 2023'

Notes

version('-java') reports 'Java is not enabled', since MatLivre has no Java virtual machine.

See also

ver verLessThan matlabRelease isMATLABReleaseOlderThan