VerGE

버전 1.0.9 (6.65 KB) 작성자: Raphael Guzman
Semantic version comparison m-function. Matlab function that will compare a cell array of values to a reference version (default: greater th
다운로드 수: 52
업데이트 날짜: 2020/10/13

compareVersions - Semantic version comparison (default: greater than or equal)

This function compares an array of semantic versions against a reference version.

DISTRIBUTION:
GitHub: https://github.com/guzman-raphael/compareVersions
FileExchange: https://www.mathworks.com/matlabcentral/fileexchange/71849-compareversions

res = COMPAREVERSIONS(verArray, verComp, verCheck)
INPUT:
verArray: Cell array with the following conditions:
- be of length >= 1,
- contain only string elements, and
- each element must be of length >= 1.
verComp: String or Char array that verArray will compare against for
greater than evaluation. Must be:
- be of length >= 1, and
- a string.
verCheck: (Optional) Function handle for comparison with the following conditions:
- Must be of the form @(x,y)
- In an element of verArray, x represents a float for the part to compare
- In verComp, y represents a float for the part to compare
- Default is greater than or equal to i.e. @(x,y) x >= y
OUTPUT:
res: Logical array that identifies if each cell element in verArray
satisfies verCheck.
TESTS:
Tests included for reference. From root package directory,
use commands:
suite = TestSuite.fromFolder(pwd, 'IncludingSubfolders', true);
run(suite)

EXAMPLES:
output = compareVersions({'3.2.4beta','9.5.2.1','8.0'}, '8.0.0'); %logical([0 1 1])
output = compareVersions({'3.2.4beta','9.5.2.1','8.0'}, '8.0.0', @(x,y) x<y); %logical([1 0 0])
compareVersion_v = compareVersions('version'); %'1.0.9'

Tested: Matlab 9.1.0.441655 (R2016b) Linux
Author: Raphael Guzman, DataJoint

$License: MIT (use/copy/change/redistribute on own risk) $
$File: compareVersions.m $
History:
001: 2019-06-12 11:00, First version.

OPEN BUGS:
- None

인용 양식

Raphael Guzman (2024). VerGE (https://github.com/guzman-raphael/compareVersions/releases/tag/1.0.9), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2016b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Logical (Boolean) Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.9

See release notes for this release on GitHub: https://github.com/guzman-raphael/compareVersions/releases/tag/1.0.9

1.0.8

See release notes for this release on GitHub: https://github.com/guzman-raphael/compareVersions/releases/tag/1.0.8

1.0.7

See release notes for this release on GitHub: https://github.com/guzman-raphael/compareVersions/releases/tag/1.0.7

1.0.5

See release notes for this release on GitHub: https://github.com/guzman-raphael/compareVersions/releases/tag/1.0.5

1.0.4

See release notes for this release on GitHub: https://github.com/guzman-raphael/compareVersions/releases/tag/1.0.4

1.0.2

See release notes for this release on GitHub: https://github.com/guzman-raphael/compareVersions/releases/tag/1.0.2

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.