Not really my solution... just a slightly cheating version of @bmtran's.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
x = 'XIX';
y_correct = 19;
assert(isequal(roman(x),y_correct))
Error: You may not use the command(s) str2func in your code
|
2 | Fail |
%%
x = 'IV MMXII LIV';
y_correct = [4 2012 54];
assert(isequal(roman(x),y_correct))
Error: You may not use the command(s) str2func in your code
|
3 | Fail |
%%
x = 'MDCCCCX MCMIII MCMX';
y_correct = [1910 1903 1910];
assert(isequal(roman(x),y_correct))
Error: You may not use the command(s) str2func in your code
|
4 | Fail |
%%
x = 'MDCCCCLXXXXVIIII MCMXCIX MIM';
y_correct = [1999 1999 1999];
assert(isequal(roman(x),y_correct))
Error: You may not use the command(s) str2func in your code
|
Make the vector [1 2 3 4 5 6 7 8 9 10]
35560 Solvers
Find state names that end with the letter A
708 Solvers
348 Solvers
130 Solvers
Magic is simple (for beginners)
2752 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!