Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

File Exchange Pick of the Week

June 27th, 2007

Algorithm development video

Here at the MathWorks, one of our Core Values is Continuous Improvement. Part of that is about being process oriented- “Clock building is better than time telling.”

Following that Core Value to talk about algorithm development, it takes more than just looking at finished algorithms (time telling), you need to look at the process of algorithm development (clock building). In that spirit, I wanted to present a new video where I spend fifteen minutes in MATLAB developing an algorithm. You will see every line of code as it is written (and rewritten). Along the way, you will see:

  • Short description of the algorithm to develop
  • Creation and exploration of a test case
  • Initial creation and reworking of the variable naming convention to avoid using “magic numbers”
  • Intermediate testing of algorithm
  • Keeping code clean and readable
  • Use of debugger to understand error messages
  • Use of visualization techniques to understand output
  • Effective use of MATLAB desktop tools

While the topic of the movie is an interesting little algorithm about fractals, the video is more about the process of programming in MATLAB.

Video Content

Find the files here.

6 Responses to “Algorithm development video”

  1. Brian Mintah replied on :

    Doug,
    Can you please post the video in another format, say Windows Media? I am unable to view the shock wave format and currently has new program install constraints on my PC.

    Thanks,
    Brian.

  2. Doug replied on :

    Brian,

    Sure thing. I just updated the zip file to include the .WMV you requested.

    Doug

  3. Andrew Catellier replied on :

    I find it re-assuring to be reminded that everyone has to start from scratch for some things, and that trials are endured by all.

    I do however, find it annoying that MATLAB error messages are still so very cryptic. We really shouldn’t have to enter debug mode to figure out why the subscripted dimension assignment was mismatched. Are we holding on to these messages for the sake of compatibility? Maybe a better message would be “expected matrix output not compatible with matrix element assignment”. Sure, that’s confusing too, but at least the person reading the error would see the red flag “matrix output” and recognize what he was doing.

    And while I’m on my soap box, can we have line numbers for errors thrown when running code in cell mode? How about printing values of loop control variables when errors are thrown from nested loops? I realize there are alternatives, and this may not be the best place to voice my concerns…just sayin’! Seems like these problems would greatly impact the productivity of many, if not all MATLAB users.

    Andrew

    [keyboard mishap edited as per Andrews note- Doug]

  4. Roy Goodman replied on :

    Doug,
    I’ve tried to view this with several different programs on my Powerbook. Each fails in its own way. Could please you post it on youtube as you have some earlier videos.
    Thanks,
    Roy

  5. Doug replied on :

    Roy,

    This was taken at a much higher resolution, it will not fit on YouTube. Sorry, this is the first report of not being able to view the video, anyone else seeing problems?

    Doug

  6. Doug replied on :

    I just changed the resolution and made it in-line. All should be well now.

    Enjoy,
    Doug

Leave a Reply


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

  • Doug: Gamal, That is something that can be done. Do you have the Data Acquisition toolbox? What have you tried, can...
  • Gamal: Dear Sir, I am working in a project that i use an Analogue to digital converter HW to transfer analogue...
  • Berdakh Abibullaev: Great! This is very convinient to use. But I use matlab codes for opening the data and...
  • jiro: Mahmood, It’s probably best to ask the author of the tool for specific questions regarding the...
  • Mahmood: Hi there, when I run this program application, it gives me the following error ??? Error using ==>...
  • Brett: Hi M, Back from vacation…just downloaded DEMORSE, and ran it on the WAV file I created for this post....
  • Quan Quach: Doug is my favorite MathWorks blogger. Loren is also my favorite. That Mike guy not so bad. So Arthur got...
  • Doug: Maram, You might want to look at the Database toolbox. http://www.mathworks .com/products/databa se/ Doug
  • Bob: Nayaki, if you need additional help using a File Exchange submission, you might try contacting the author. You...
  • maram: hi, I have a question I have a matlab code and i want to read a data from SQL server database to use it in...

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

Related Topics