No License
I use it to compare version numbers of data stored by different versions of my software for compatibility reasons.
function result = vercmp(ver1, varargin)
% Compares two version numbers.
%
% Example: 7.4.0.287
% major release.minor release.patch level.build
% Everything except the major release is optional.
%
% Arguments:
% ver1 - Version number one
% ver2 - Version number two; default: version cmd output
%
% Return values:
% result - Index of part which differs:
% 0 if equal
% > 0 if ver1 > ver2
% < 0 if ver1 < ver2
% NaN if ver1 | ver2 are not a version number
%
% Author: Johannes Kissel
% Last modified: 29.01.2008
Cite As
Johannes Kissel (2024). vercmp (https://www.mathworks.com/matlabcentral/fileexchange/18640-vercmp), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |