Evaluation of verLessThan() correct?

1 Ansicht (letzte 30 Tage)
Benjamin
Benjamin am 1 Mär. 2016
Beantwortet: Steven Lord am 1 Mär. 2016
I noticed that verLessThan(x) evaluates version numbers only XX.XX.XX Consider this test:
if verLessThan('TB','5.1.4.5')
disp('lower than 5.1.4.5');
else
disp('higher than 5.1.4.5')
end
Let's assume TB is '5.1.4.1'.
The result is:
higher than 5.1.4.5
My opinion, result should be: 'lower than 5.1.4.5'.
Someone know how I can evaluate more after-dot-version numbers?

Akzeptierte Antwort

Steven Lord
Steven Lord am 1 Mär. 2016
The help text for verLessThan in release R2015b states:
VERSION must be a string in the form 'major[.minor[.revision]]', such as '7', '7.1', or '7.0.1'
The documentation also states this, though a bit less forcefully.
Specify the version number in the form of major[.minor[.revision]], for example '9.2'.
From this I would say that VERLESSTHAN does not handle version number differences at a lower granularity than revision.

Weitere Antworten (0)

Kategorien

Mehr zu Platform and License finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by