Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 'Morse code is FUN!';
y_correct = '-- --- .-. ... . -.-. --- -.. . .. ... ..-. ..- -. -.-.--';
assert(isequal(MorseCodeGenerator(x),y_correct))
|
2 | Pass |
x = 'Am I 20, (who knows?)';
y_correct = '.- -- .. ..--- ----- --..-- -.--. .-- .... --- -.- -. --- .-- ... ..--.. -.--.-';
assert(isequal(MorseCodeGenerator(x),y_correct))
|
3 | Pass |
x = 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG: or does he...';
y_correct = '- .... . --.- ..- .. -.-. -.- -... .-. --- .-- -. ..-. --- -..- .--- ..- -- .--. ... --- ...- . .-. - .... . .-.. .- --.. -.-- -.. --- --. ---... --- .-. -.. --- . ... .... . .-.-.- .-.-.- .-.-.-';
assert(isequal(MorseCodeGenerator(x),y_correct))
|
4 | Pass |
x = '1234567890';
y_correct = '.---- ..--- ...-- ....- ..... -.... --... ---.. ----. -----';
assert(isequal(MorseCodeGenerator(x),y_correct))
|
3237 Solvers
819 Solvers
Back to basics 17 - white space
245 Solvers
Convert a vector into a number
503 Solvers
Remove white space from the string
168 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!