The function isVersionRecent compares version numbers with different lengths and returns true if the version numbers are equal. But it breaks if the lenghts are equal and less than 3.
Example:
>> isVersionRecent("2.0", "2.0")
returns the following error
Index exceeds the number of array elements. Index must not exceed 2.
Error in [isVersionRecent](matlab:matlab.internal.language.introspective.errorDocCallback('isVersionRecent', '/MATLAB Drive/isVersionRecent.m', 24)) ([line 24](matlab: opentoline('/MATLAB Drive/isVersionRecent.m',24,0)))
elseif version1Arr(3) >= version2Arr(3)
The function
isVersionRecent
compares version numbers with different lengths and returns true if the version numbers are equal. But it breaks if the lenghts are equal and less than 3.Example:
returns the following error