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.

  • Zach: Hi Doug and Les, I didn’t have a lot of time to mess with this, but I did find a work-around. I plotted...
  • hamed: k
  • Les: @Zach This isn’t exactly what you are looking for but at least it puts all three parameters on the same...
  • Zach: Thanks for your suggestions Doug. I’ll give that a shot and see what happens. I’ve seen many of...
  • Doug: @Zach, I would say to use plotYYY, because that is close to what you want, but using depth as Y makes sense....
  • Doug: @Teja, I think this will work: http://www.mathworks .com/access/helpdesk /help/techdoc/ref...
  • Gify: merry christmas :) nice christmas tree! Regards, Janet Gify
  • Teja: Dear Doug Is there anyway to plot a surface from nonuniform data without meshgrid and griddata? Basically i...
  • Zach: I’m working with geophysical data, so I’d like to produce a depth profile. The y-axis would be...
  • Doug: @Ashok First, please do not use variable names that are MATLAB commands (std and mean). Second, p(j) should be...

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