No BSD License  

Highlights from
Numeral Systems Toolbox 1.1

3.875

3.9 | 8 ratings Rate this file 2 Downloads (last 30 days) File Size: 12.67 KB File ID: #4014

Numeral Systems Toolbox 1.1

by Rasmus Anthin

 

28 Sep 2003 (Updated 13 Oct 2003)

Convert from and to different numeral systems. Arabic, Roman, Mayan, Ionic, Babylonian.

| Watch this File

File Information
Description

This toolbox contains four main functions that converts back and forth between different numeral systems. Numeral systems supported are yet so far only the ancient systems; Arabic, Roman, Mayan, Ionic and Babylonian.
The take a string or cellstring as an input which represents numerals in either Arabic or some other system and converts it to a string of numerals of the other system.

ROMAN : arabic <-> roman
MAYAN : arabic <-> mayan
IONIC : arabic <-> ionic (greek)
BABYLONIAN : arabic <-> babylonian

Thus you can convert between all of these systems. However some of them have certain interval constraints. Like the roman converter only allows for converting up to numbers as big as 3999 (arabic), whilst ionic numbers can only be as large as 999.

More systems will be added to the toolbox in the future.

Examples:

roman 1994 %will be 'MCMXCIV'
roman DCCCLXXXVIII %results in arabic '888'
roman(roman('2003')) %yields '2003'
str2num(roman('xxiii')) %the number 23
roman({'iv','VII','4'}) %results in {'4','7','IV'}

mayan 64302 %mayan: 8*20^3 + 0*20^2 + 15*20 + 2
mayan(char({'oo','='})) %mayan for arabic 7
mayan([mayan('45+') mayan('80+')]) %perform mayan addition

ionic 999 %results in '\sampi\qoppa\theta'
ionic \nu\zeta %same as arabic 57
title(ionic('456')) %displays the result

babylonian 21609 %147^2, notice the gap
babylonian('VVV <<VVVVVV') %same as 3*60+26 = 206
babylonian('YYY <<YYYYYY') %returns '206'
babylonian(roman('XLIV')) %returns babylonian for '44'

For more MATLAB programs, refer to http://www.etek.chalmers.se/~e8rasmus/eng/matlab_programs.html

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
chb

MATLAB release MATLAB 5.2 (R10)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
20 Feb 2004 Fahad Al Mahmood

Very simple yet useful functions indeed! Good Job!

23 Mar 2004 lisa-marie bryan  
05 Jan 2005 lkjg lkjhg

lkg

30 Oct 2005 reah aerh

erhg

30 Oct 2005 Dragoon of Death

yo wassup great program

21 Mar 2006 Allison Hatch  
09 Nov 2006 Gustavo Bruzual

Sweet program!

10 Feb 2007 susan hillfox

cum on guys you can do better what i want to find cant like to be on here

Please login to add a comment or rating.
Updates
03 Oct 2003

Extended it to take cellstring as input. Also made a toolbox out of it and added two additional routines; one for the mayan system and another for the ionic (greek) system.

13 Oct 2003

Now includes the babylonian numeral system. Still, no converters support fractionals (yet to come).

Tag Activity for this File
Tag Applied By Date/Time
arabic Rasmus Anthin 22 Oct 2008 07:08:09
hinduarabic Rasmus Anthin 22 Oct 2008 07:08:09
european Rasmus Anthin 22 Oct 2008 07:08:09
roman Rasmus Anthin 22 Oct 2008 07:08:09
mayan Rasmus Anthin 22 Oct 2008 07:08:09
ionic Rasmus Anthin 22 Oct 2008 07:08:09
greek Rasmus Anthin 22 Oct 2008 07:08:09
babylonian Rasmus Anthin 22 Oct 2008 07:08:09

Contact us at files@mathworks.com