Semantic Version Syntax for Packages
The MATLAB® package manager uses semantic version syntax to help distinguish between different iterations of a package and to help avoid unwanted incompatibilities. Every package has an associated version. When a package is updated, it is recommended that the version is updated to reflect the new changes.
Semantic Versions
Version syntax follows the Semantic Versioning
2.0.0 standard where versions are presented in the following format:
where
each version number must be a non-negative integer, for example <Major Version>
.<Minor
Version>
.<Patch Version>
1.2.3
.
Pre-release status is optional and is specified by adding
-
to the end of
the version range, for example <pre-release version>
1.2.3-alpha
. A specific build is optional
and specified by adding +
<build
version>
.
Here are several examples of valid semantic version syntax:
1.0.0 1.2.3-alpha 1.2.3-alpha+exp 3.5.1+latest
Version Ranges
In some cases, such as for package dependencies, a range of versions can be specified. A
version range can include the <
, <=
,
>
, or >=
operators in front of a version number. For
example >2.1.13
would specify all versions greater than
2.1.13
. Multiple ranges separated by whitespace can be specified to
further limit matches. For example, >2.1.13 <=2.1.15
would include
versions 2.1.14
and 2.1.15
but would not include
2.1.13
or 2.1.16
. Use the ||
operator to designate multiple acceptable version ranges. For example, <2.1.13
|| >2.1.15
would include versions less than 2.1.13
and
greater than 2.1.15
but would not include
2.1.14
.
Here are several examples of valid semantic version range syntax:
>2.1.13 >2.1.13 <=2.1.15 <2.1.13 || >2.1.15
MATLAB Release Version
MATLAB release do not follow the Semantic
Versioning 2.0.0 standard. For MATLAB releases versions consists of three
dot-separated numbers in the format: <release
year>
.<first or second
release>
.<update number>
. When specifying
MATLAB version using this version syntax, the first number is equal to the last two digits
of the release year. The second number is 1
for a releases and
2
for b releases. The update number corresponds to the update version.
For example, R2024b would have a version of 24.2.0
. The first update for
R2025a would have a version of 25.1.1
. Pre-release status is optional and
is specified by adding -prerelease
to the end of the version range, for
example the prerelease version of R2025b would be 25.2.0-prerelease
.
See Also
Objects
Checks
mpmcreate
|mpminstall
|mpmuninstall
|mpmsearch
|mpmlist
|mpmAddRepository
|mpmListRepositories
|mpmRemoveRepository