File Exchange Pick of the Week

Our best user submissions

Will code for food (or free)

Everyone,

I want to say hello to all of our new visitors that heard about us from the article in Design News.

I am going to try something different this week: I want to hear from you.

I have been thinking about my Pick Of The Week from a few weeks ago that had to do with formatting of code. There are some great white papers out there that talk about coding styles like this one from Richard Johnson

What I would like to see is all of you MATLAB users out there to send me up to five tips, tricks or techniques that you think other people would benefit from seeing. This exercise will be different from the other guides because I want it to be written in CELL MODE publishing format by hundereds of people. You can get a demo of that by executing this command in MATLAB R14.

playbackdemo('PublishingfromtheEditor_viewlet_swf')

Each tip should look something like this:

dHull1.m

%% Use numel(x) not prod(size(x))
% It is more clear and efficient to use numel(x) than prod(size(x))
% when trying to find the number of elements in a matrix.
% Tip by Doug Hull

x = [1 2 3; 4 5 6];
numel(x)
prod(size(x))

Notice the headline is descriptive, the commentary tells a little bit more and there is some executable code that works. Brief tips are the best. Be creative so that we compile lots of different ideas.

I am very curious what kind of tips come out of this. I will compile the best of the tips into one big file and post it to the file exchange. Editing will begin on August 18th. Because of the large number of tips I expect to get, I will not be responding to individual e-mails.

To make it easier to sort through all these e-mails, could you please use the following conventions:

To: hull@mathworks.com
Subject: POTW TIP

Send the tips as attachments, use this naming scheme:
[‘First initial’ ‘Last name’ Number ‘.m’]
for example dHull1.m

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.