This week, instead of Picking one of my favorite files, I'm going to solicit your suggestions for Pickworthy files. Except on rare occasions, I tend to select submissions that are useful to my own workflows. But I recognize that many of you use MATLAB and Simulink differently than I do, and in different fields. So here's your chance to recognize something that you particularly like.
Respond to this post with suggestions for future Picks. What have you found most useful? Perhaps you've found some overlooked gems? Something you think would have broad appeal, if they only knew about it? And if Jiro or I end up selecting a file as a Pick of the Week based on your suggestion, we'll send you some cool MATLAB swag!
- Please don't steer to your own file. (We may have another round of this later, in which we allow contributors to nominate their own files, but for this round, let's focus on recognizing the work of our fellow MATLAB or Simulink fans.)
- Please only suggest files that are covered under the BSD!
- Submissions should be exemplary for some reason that you can point out. Is it just beautifully written? Have you found it exceptionally useful? Great use of visual elements? (Tell us what it was that led you to select a particular file. We may even quote you!)
- Your nomination constitutes your acknowledgment that we may quote you, and your permission to do so.
- Please don't suggest any files that have already been Picked. (All previous Picks of the Week are tagged on their entries with a POTW stamp.)
- Remember: cool MATLAB swag to anyone who steers us to a file we use!
- Please direct your correspondences to the comments section of this post.
- Happy hunting!
- Sorry, one more rule: we're only going to consider files that don't use undocumented functionality.
Get the MATLAB code
Published with MATLAB® 7.14
22 CommentsOldest to Newest
Ooh, I like this POTW, and I expect that I will find many useful additions to my workflows from the comments!
I have a few submissions that I use in my own work, which I think others may find useful.
First, I really like John D’Errico’s arclength code. This simple function determines the arclength of a curve in space using a variety of methods. There is something about a bit of code which is so well commented and written you actually learn something. This is an excellent bit of code writing, and the work he did to explain the operations has been more than helpful to me when developing my own code using splines for a host of problems related to my work.
Next, I nominate tight_subplot. This handy function allows for a robust (and simpler) handling of subplot objects. I especially like how easy it is to control the margins and gaps to produce multiple subplots that don’t waste space. It’s been a life saver for presentation quality plots!
Finally, I nominate getcon. Unfortunately, the author has not specified a BSD license, so it’s out of the running, but I’ll still plug its handiness anyway! This little function will give the coordinates of contour slices through your data. VERY handy for those times when you might like to manipulate exactly where your contours lie. I’ve personally used it to create functions of discrete data and perform gradient descents- without getcon I’d have had a terrible time otherwise!
One I use frequently is convnfft by Bruno Luong. The code is well written, memory efficient, and exceptionally fast.
Excellent! I’m pleased to see the responses starting to come in, and I promise that we’ll consider them all–except for Michael’s GETCON, which (as you mentioned, Frank, is not covered by the BSD license). (If you’re listening, Michael, and care to add that license agreement to your file, we’ll take a look at that one, too!)
Zohar Bar-Yehuda’s plot_google_map (file #27627) is not only cool, it’s also very easy to use and incredibly useful for plotting spatial data.
If have found this file very usefull and have implemented it in a program used every day within our organization.
“Edit plotted data with mouse” by Jimmy Shen
Very helpfull property when no MatLab-user need to manipulate data within a program made with MatLab.
I like to nominate Yair Altman with the “findjobj”. (http://www.mathworks.com/matlabcentral/fileexchange/14317-findjobj-find-java-handles-of-matlab-graphic-objects)
The code is very useful and extends the range of Matlab. It is well written and good commented.
My second proposal is jcontrol (e.g.: http://www.mathworks.com/matlabcentral/fileexchange/34235-making-matlab-swing-more) from Malcom Lidierth.
I often use this function to spice up my GUIs with javacomponents.
All submissions in the File Exchange from John D’Errico. John knows what can go wrong numerically with even simple algorithms. His submissions consistently minimize or eliminate such numerical issues. Besides that, many of his submissions are substantial contributions. Every one meets or exceeds the quality of code that is distributed with MATLAB. In fact, I found one of his submissions hidden behind the scenes in MATLAB itself as a private function called by a distributed MATLAB function.
SORRY, folks…I have one more rule to add: for our Picks, we’re going to restrict our attention to submissions that don’t used undocumented functionality–Brett
Oh Brett, that means that I must withdraw the nomination!?
Maybe The MathWorks or you allow undocumented features in a next round later…
You should do so, because there is a lot of very cool undocumented stuff. – Sven
I’d like to nominate Urs (us) Schwarz’s utilities. He has numerous submissions, and a common thread to them is that they are well written and documented, lightning fast, and stand the test of time quite well. One of his utilities that is my favorite is grep: http://www.mathworks.com/matlabcentral/fileexchange/9647-grep
Its usage may be a bit specialized, but the Mesh2D package by Darren Engwirda is a fantastic piece of code. It’s a very high-quality 2D computational mesh generation package that’s very easy to use. Easily the most useful thing I’ve ever downloaded from the file exhange, but then I am in that niche group that uses this kind of thing.
I’d like to nominate this suite of medical data file readers from Dirk-Jan Kroon.
It’s reliably had a function for every file type I’ve had to work with. In addition it’s well written and user-friendly.
Watch for the first “community-suggested” POTW selection tomorrow. (Someone will win some swag! :))
Duane, Yair, others: I’m very familiar with Urs’ contributions, and John’s. Great stuff! (In fact, they’ve both had multiple files Picked already.) For our purposes here, we’re looking for submissions, not contributors, to recommend.
Thanks, all. Keep the suggestions coming!!!
Thanks, LL. Export_fig is a previous Pick of the Week. We’re looking for recommendations for new (i.e., previously unrecognized) Picks.
Hey, I was very impressed with the Measures of Effect Size Toolbox, by Harald Hentschke. Due to it’s extensive documentation its very usuable by non-statisticians.
cell2float has been very useful to me lately. It’s simple but handy when you need to convert a cell array with different data types. I originally found it because I needed a way to handle empty cells.
Someone might find struct2str somewhat useful. It allows to “convert” a struct into a string and copy it to a listbox, for easy copying the fields to the clipboard. Feedbacks are welcome!
@Marco: Thanks. But it seems that you’ve violated the first rule of this exercise!
Bjorn replied on July 13th, 2012 at 09:10 UTC :
Since we all surely use emacs for programming, the emacs matlab mode is ubiquitous. Therefore this is a given: http://www.mathworks.se/matlabcentral/fileexchange/104-edit-m-files-in-emacs
There are two arrow-plotting functions I use, and since the one have been a potw, I hope the other might get selected too: http://www.mathworks.se/matlabcentral/fileexchange/14056-arrow3-version-5
When I work with data that has nans in them this inpainting tool makes them go away: http://www.mathworks.se/matlabcentral/fileexchange/4551-inpaintnans (it is a FEX-selec but have not been a potw)
Sometimes it is useful to plot colour-coded curves, for this this function slots in seamlessly as a replacement to plot: http://www.mathworks.se/matlabcentral/fileexchange/8597-plot-3d-color-line
To keep figures traceable: http://www.mathworks.se/matlabcentral/fileexchange/1244-stampit This function makes it automatic to keep track of how figures have been produced.
Sometimes it is necessary to extract data from figures. This is the best digitization tool I’ve found: http://www.mathworks.se/matlabcentral/fileexchange/7173-grabit
The tcolor function nicely extends surf/pcolor to make it simple to wrap RGB-images onto arbitrary surfaces: http://www.mathworks.se/matlabcentral/fileexchange/3777-tcolor-a-fast-pcolor-that-likes-rgb-images
To merge structs the catstruct function is very handy: http://www.mathworks.se/matlabcentral/fileexchange/7842
I would like to nominate a very nice alternative to fprintf with added functionality (even a a nice tic-toc type utility).