Problem 1696. Morse Code Generator! Try it!

.... . .-.. .-.. ---     . ...- . .-. -.-- --- -. . -.-.-- 
      .-.. . - ...       -.. ---       ... --- -- .       -- --- .-. ... .       -.-. --- -.. . -.-.--             .-- . .-.. .-..       - .... .. ...       -- --- .-. ... .       -.-. --- -.. .       --. . -. . .-. .- - --- .-.       ..- ... . ...       - .... .       .. -. - . .-. -. .- - .. --- -. .- .-..       ... - -.-- .-.. .       -- --- .-. ... .       -.-. --- -.. . .-.-.-             - .... .       .-.-.-       .- -. -..              -- .- -.- .       ..- .--.       .- .-.. .-..       - .... .       -.-. --- -.. . --..--       - .... . .-. .       .. ...       --- -. .       ... .--. .- -.-. .       - .... .- -       ... . .--. .- .-. .- - . ...       .-.. . - - . .-. ...       .- -. -..       .....       ... .--. .- -.-. . ...       - .... .- -       ... . .--. .- .-. .- - .       .-- --- .-. -.. ... .-.-.-             ... --- -- .       .--. ..- -. -.-. - ..- .- - .. --- -.       .. ...       ..- ... . -.. .-.-.- .-.-.- .-.-.-             --- - .... . .-.       - .... . -.       - .... .- - --..--       .- .-.. .-..       -.-- --- ..-       -. . . -..       - ---       -.. ---       .. ...       - .- -.- .       .. -.       ... --- -- .       - -.-- .--. .       --- ..-.       - . -..- -       .. -.       - .... .       ..-. --- .-. --       --- ..-.       .-       ... - .-. .. -. --.       .- -. -..       - ..- .-. -.       .. -       .. -. - ---       .-       -- --- .-. ... .       -.-. --- -.. .       .-.. .. -. .        -.-. .... .- .-.       -.-. .-.. .- ... ...  --..--       .- ...       - .... .       . -..- .- -- .--. .-.. .       -... . .-.. --- .--       ... .... --- .-- ...  
text = 'Morse code is FUN!'
Morse_code_out = '-- --- .-. ... .       -.-. --- -.. .       .. ...       ..-. ..- -. -.-.--'

Just a note: this uses international style Morse code found in:

http://en.wikipedia.org/wiki/American_Morse_code

Solution Stats

22.76% Correct | 77.24% Incorrect
Last Solution submitted on Dec 29, 2025

Problem Comments

Solution Comments

Show comments


Problem Recent Solvers92

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!