File Exchange Pick of the Week

September 19th, 2008

De do do do, de dah dah dah…

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

7 Responses to “De do do do, de dah dah dah…”

  1. Flemming Moller replied on :

    matlab rocks-

  2. Brett replied on :

    Close, Flemming, but no cigar.

  3. Szymon Gackowski replied on :

    – .- - .-.. .- -… .-. — -.-. -.- … .-.-.-
    M A T L A B R O C K S .

  4. Szymon Gackowski replied on :

    ouups there should be space between matlab and rocks (website is cutting more than one space).
    So my answer is:
    MATLAB ROCKS.

  5. Brett replied on :

    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)

  6. M replied on :

    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.

  7. Brett replied on :

    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?

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • Jon: This is a useful tool - but in fairness I have to point out that it is remarkably similar to a routine of the...
  • oleg: The author has implemented skewness, kurtosis and checks answering appropriately to the critic.
  • Ashok: how to store 10 or more random number in a loop a loop for i = 1:n mean(i) = input(’enter the mean value...
  • Ben: Doug, Thanks for the very helpful videos! Uitables seem like a convenient way to make a customized property...
  • oleg: Allstats has no checks, no comments and could also be improved (talking about prctile implementatio). Not to...
  • Todd: Additional information and a link to download free MATLAB and Simulink LEGO MINDSTORMS NXT code can be found at...
  • Doug: @Leo, Here is the “English version” of that code. “vec = []” makes an empty variable...
  • leo: Dear Doug I have a question in your code ‘October 9th, 2009 at 13:53′ vec = []; vec = [vec val]; I...
  • Shanker Keshavdas: You sir, are a gentleman and a scholar… No really, helped me out a lot. As to what is...
  • Quan Zheng: how can I get a copy of stepspecs.m?

These postings are the author's and don't necessarily represent the opinions of The MathWorks.