Cody

Problem 302. Convert Roman to Arabic Numerals

Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g. the Superbowl, Olympics, movie credits). But who wants to bother with trying to translate them into decimal notation? I sure don't.. thus the problem is to take an input string array with an arbitrary number of Roman numerals, separated by spaces, and return an array of the resulting Arabic versions. Note since there is no standardization regarding some of the more 'modern' rules of Roman numeral notation, there may be multiple ways of representing the same Arabic number, as shown in the example below:

'XIX' -> [19]
'IV MMXII LIV' -> [4 2012 54]
'MDCCCCLXXXXVIIII MCMXCIX MIM' -> [1999 1999 1999]

Solution Stats

47.19% Correct | 52.81% Incorrect
Last solution submitted on Mar 29, 2016

Solution Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more