Tuesday, February 23, 2010

Muddling around in MATLAB

Guest Contributor, JTGuest Contributor, JT
You may ask yourself, why is "I ♥ CS (and other things)" being commandeered by some douchebag known as JT?

This is a legitimate question. I have even asked myself the same question, minus the douchebag part. Along with, do I even know what muddle means? Kind of. Do I mind using it in a way that makes very little sense? Not at all, it sounds like a fine title. Anyways, I wasn't planning on introducing myself. Instead, I am going to write about a current event in Olga, the author of your favorite blog, and I's life.

It just so happens to be, learning the basics of the technical computing application, MATLAB. Her EE102 Systems and Signals professor, Balakrishnan, assigned a project that required it's use.
We proceeded by first, scratching our heads, to relieve a nagging itch of course.

This is the assignment sheet:
What did I experience when she shared this with me? I saw a differential equation and some piecewise functions, and almost immediately I could smell the oh-so-familiar odor of a dusty room. The accumulation of dust in the mathematical quarters of my mind was as thick as the snow on the ground back east. It made me feel like the abandoned Ford Pinto that lives in a field of the side of Interstate-5 along the grapevine grade, rusty and broken-down. Luckily, Olga is an excellent mathematician so she was the brains behind Team Zissou. I was the code-monkey, and away we go. (Which, by the way, is an excellent film. Perhaps Olga will publish a review of it someday soon.)

Our final m-code came out to be this:

When executed, rendered this awesome plot figure:

and produced a sound like a quick low knock at a door or a little bubble in chewing gum popping, that was supposed to be this waveform:


Unlike some of her classmates, who got duped by a button which printed MATLAB's Command History window, her program printed nice and neatly, because I worked on it the entire time as a saved .m file.
As a disclaimer, neither she or I, know for a fact that this solution is correct. It was just our best effort. There is much more to explore in this powerful application and I look forward to using it in the future. I need to update my resume now and get ready for the phone calls from all the text-to-speech companies who want to produce popping and knocking noises.

Host, Olga
Host and spellchecker, Olga

ucla university california los angeles computer science electrical engineering 102 balakrishnan matlab speech vocal voice synthesis tract cord signal system second order differential equation impulse step response tf convolve conv fourier coefficient plot stem angle abs cascaded soundsc

No comments :

Post a Comment