Problem 394. Convert String to Morse Code
Solution Stats
Problem Comments
-
1 Comment
Tran Tran
on 19 Jul 2022
replace table for who need
symbol = {'A' 'N' 'B' 'O' 'C' 'P' 'D' 'Q' 'E' 'R' 'F' 'S' 'G' 'T' 'H' 'U' 'I' 'V' 'J' 'W' 'K' 'X' 'L' 'Y' 'M' 'Z' '1' '6' '2' '7' '3' '8' '4' '9' '5' '0' };
morse = {'.-' '-.' '-...' '---' '-.-.' '.--.' '-..' '--.-' '.' '.-.' '..-.' '...' '--.' '-' '....' '..-' '..' '...-' '.---' '.--' '-.-' '-..-' '.-..' '-.--' '--' '--..' '.----' '-....' '..---' '--...' '...--' '---..' '....-' '----.' '.....' '-----' };
symbol{k} ---> morse{k}
Problem Recent Solvers194
Suggested Problems
-
Check to see if a Sudoku Puzzle is Solved
307 Solvers
-
285 Solvers
-
845 Solvers
-
Put two time series onto the same time basis
298 Solvers
-
The sum of the numbers in the vector
532 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!