# verLessThanFS

verLessThanFS compares version of MATLAB to specified version number

## Syntax

• result=verLessThanFS(vernumber)example

## Description

function verLessThanFS is much faster than verLessThan because it just checks the version of MATLAB and calls directly the relevant built in functions. The number containing the MATLAB version is cached for better performance. In order words, the first time verLessThanFS is called the vector with two numbers associated to the MATLAB version is stored in persistent variable named cachedMatlabVerFS.

 result =verLessThanFS(vernumber) Test whether the current version is older than MATLAB version 9.10.

## Examples

expand all

### Test whether the current version is older than MATLAB version 9.10.

In this case the input argument is a vector with two elements

numbertotest = [9 10];
out=verLessThanFS(numbertotest);
if out == true
disp(['current version is older than ' num2str(numbertotest)]);
else
disp(['current version is not older than ' num2str(numbertotest)]);
end

## Related Examples

expand all

### Test whether the current version is older than MATLAB version 9.

12 In this case the input argument is character

numbertotest = '9.11';
out=verLessThanFS(numbertotest);
if out == true
disp(['current version is older than ' num2str(numbertotest)]);
else
disp(['current version is not oder than ' num2str(numbertotest)]);
end

### In this example the input argument is a scalar double We test whether current version is smaller than 8.

0.

numbertotest = 8;
out=verLessThanFS(numbertotest);
if out == true
disp(['current version is older than ' num2str(numbertotest)]);
else
disp(['current version is not older than ' num2str(numbertotest)]);
end

## Input Arguments

### vernumber — version of MATLAB to test. character or vector of length 2.

Vector if two numbers containing the version of MATLAB to test again current version or charater. If version is a character, it must be in the format major.minor.revision or major.minor. If version is a vector of length 2, the first element is the major revision and the second element is the minor revision. Note that both element must be non negative integer numbers. If version is a scalar the second element (minor revision) is set to 0.

REMARK: Note that this function only considers major and minor version and not the revision version.

Example - [8 3] or '8.3'

Data Types: double

## Output Arguments

### result —True or false. Boolean

result is true if the current version of MATLAB is older than the version specified by vernumber, and false otherwise.

## See Also

This page has been automatically generated by our routine publishFS