Brett's Pick this week is Morse, by Fahad Al Mahmood.
Last week I blogged about how to make MATLAB talk. This week, we can look at how to make it speak Morse code!
I recall fondly being an undergrad engineering student, and being required to learn Morse code as a prerequisite to throwing my name into contention to drive a solar-powered car in a long-distance race. I never got very good at it (Morse code, that is), and have forgotten everything I once knew. (Except for S's and O's...we all seem to know them!)
Fahad's MORSE is pretty cool; it renders a string of characters as an audible series of dots and dashes, making translating words into Morse code trivially easy. Now if someone would just write a MATLAB program that listens to a series of dots and dashes and translates it back to text. Any takers?
Oh, and there's a t-shirt in it for the first person to post in the comments to this blog the (exact!) message encoded in the video above!
Get
the MATLAB code
Published with MATLAB® 7.6



matlab rocks-
Close, Flemming, but no cigar.
– .- - .-.. .- -… .-. — -.-. -.- … .-.-.-
M A T L A B R O C K S .
ouups there should be space between matlab and rocks (website is cutting more than one space).
So my answer is:
MATLAB ROCKS.
We have a winner!
Note that I would have preferred to write “MATLAB Rocks!” but Fahad didn’t include the exclamation point in his code. Szymon, please send me your address, and I’ll get you your swag.
(brett.shoelson@mathworks.com)
There’s a demorse.m file submitted to the exchange. It should appear in a few days. It converts from the audio into readable text, basically ‘de-morsing’. Works with audio files created by the referenced morse function.
Hi M,
Back from vacation…just downloaded DEMORSE, and ran it on the WAV file I created for this post. Here’s the output from your program:
M A T L A B R O C K S .
Nice work!
Next challenge: connect to a soundcard (think Data Acquisition Toolbox!), listen for the beeps, and automatically decipher them. Anyone?