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

Solution 198113

Submitted on 29 Jan 2013 by Aurelien Queffurust

Correct

103Size
Leading solution size is 20.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
assert(isequal(numeri_romani('+','I','I'),'II'))
n =
     2
ans =
II
2
Pass
 
%%
assert(isequal(numeri_romani('-','X','I'),'IX'))
n =
     9
ans =
IX
3
Pass
 
%%
assert(isequal(numeri_romani('+',numeri_romani('*','XXV','XX'),numeri_romani('+','IV','V')),'DIX'))
n =
   500
ans =
D
n =
     9
ans =
IX
n =
   509
ans =
DIX