ROMAN2NUM and NUM2ROMAN: modern Roman numerals

버전 1.1.1 (4.52 KB) 작성자: François Beauducel
Converts Roman numerals to and from integers
다운로드 수: 2.8K
업데이트 날짜: 2021/1/4

These two scripts convert Roman numerals to and from any integer (scalar, vector or matrix), including large numbers greater than 4999 with the parenthesis notation (multiplies by 1000).

The function NUM2ROMAN uses strict rules of modern notation (substractive principle for 4 and 9 bases) except for the common 'MMMM' form replacing '(IV)'.

ROMAN2NUM is more flexible and is able to convert some other Roman notation possibilities, for instance the 3 different expressions roman2num({'IC','XCIX','XCVIIII'}) return [99,99,99], or roman2num({'MDXV','MCCCCCXV'}) return [1515,1515].

See help for syntax, and script comments for details.

인용 양식

François Beauducel (2024). ROMAN2NUM and NUM2ROMAN: modern Roman numerals (https://github.com/beaudu/romanum/releases/tag/v1.1.1), GitHub. 검색됨 .

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

Community Treasure Hunt

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

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

See release notes for this release on GitHub: https://github.com/beaudu/romanum/releases/tag/v1.1.1

1.1.0.0

Adds some basic checks on the input arguments; ROMAN2NUM now accepts lowercase (all thanks to Oleg Komarov comments).

1.0.0.0

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