| Description |
getversion returns the MATLAB version number as a double, to allow inequality comparisons when checking for ranges of MATLAB versions. The major, sub, and sub-sub version numbers are returned (MATLAB '6.5.2.202935 (R13) Service Pack 2' returns 6.52).
This code is more portable than "ver" (which verLessThan uses) because it does not use structs. It should work on any MATLAB that has the version, sscanf, and length functions.
It has been tested on MATLAB 6.1, 6.5.2., 7.0.1, 7.0.4, 7.1, 7.2, 7.3, 7.4, and 7.5. I no longer have MATLAB 5.x or earlier; please notify me if you test it on those platforms.
See also ver, version, and verLessThan. |