Subscribe: Comments for File Exchange Pick of the Week
Preview: Comments for File Exchange Pick of the Week

Comments for File Exchange Pick of the Week

Jiro and Sean share favorite user-contributed submissions from the File Exchange.

Last Build Date: Tue, 24 Oct 2017 12:50:30 +0000


Comment on Mex Multithreading by Sean de Wolski

Tue, 24 Oct 2017 12:50:30 +0000

Thanks for the advice Royi!

Comment on Mex Multithreading by Royi

Sat, 21 Oct 2017 09:30:10 +0000

In my opinion, the best way to use C Code in MATLAB is using DLL's and not MEX. You can create a code which is universal (Will create DLL in Windows, SO in Linux and Dylib in macOS) and utilize OpenMP and have Multi Threading in all operating systems. It's easier and more portable.

Comment on MATLAB Basemap Data (R2017b) by Jiro Doke

Wed, 04 Oct 2017 13:27:54 +0000

I've added an animation at the end to illustrate the interactive zooming capability.

Comment on MATLAB Basemap Data (R2017b) by Rob Comer

Tue, 03 Oct 2017 17:29:31 +0000

Thank you for your feedback.   To answer your question about the projection, geobubble currently is limited to a Mercator projection. In Mercator projections like the one underlying geobubble, features closer to the poles do appear magnified relative to features closer to the equator. We chose the Mercator projection because of its suitability for interactive displays with multiresolution basemaps. That's what underlies geobubble. You can't see it from the static displays in the blog post, but the basemap is multiresolution and responds automatically when you zoom or pan, increasing in detail as the zoom level increases. The choice of projection helps enable this.    To mitigate hiding, the bubbles are stacked by size (independently of how the inputs are sorted), with the largest on the bottom, and they are indeed semi-transparent. The interactivity of the map makes it easy to spread bubbles apart by increasing the zoom level. For example, you can place the cursor over a clump of bubbles, then rotate the scroll wheel on your mouse or swipe vertically on your trackpad to see the individual bubbles more clearly. Bubble merging could be useful, too, of course.    By default, the bubble size legend limits match the extrema of your data. You can also set them manually -- like this, for example: gb.SizeLimits = [0 600]. Setting the SizeLimits property is useful when constructing a map for publication, or if you need bubble size to have consistent meaning from one plot to another to facilitate visual comparison.

Comment on MATLAB Basemap Data (R2017b) by Joanne Williams

Wed, 27 Sep 2017 11:15:41 +0000

This at first glance looks really useful, and I had a long comment I've just deleted whilst looking up the relative areas of Greenland and Africa... is this really only available for the Mercator projection? It's a terrible choice for these purposes, and only used in geoscience if you absolutely have to preserve angle at all scales, (which is why google maps and spin-offs use it.) Try plotting a dot on the north/south pole! Also these plots tend to distort the perception of the data by overlaying one set of dots on another. In the example here there are purple dots almost buried by the blue. It can be really dangerous if you've first sorted the data! A better approach is to merge neighbouring dots to create larger bubbles, and/or use transparency. Does this method provide that? Does it warn the user if dots are hidden? If not, what's the advantage over a simple scatterplot? (Sorry I can't test it properly as I've only got access to 2016b). Oh, also if I was reviewing a paper I'd probably object to the 6 significant figure bubble size on the legend... a method of rounding there is required, like you would on a normal x-y axis label.

Comment on Cursorbar by Yair Altman

Sun, 10 Sep 2017 10:58:58 +0000

Edit: it seems that this utility is actually not Marjorie's, but rather Yaroslav Don's (at least originally), which was simply posted under Marjorie's name. See the discussion here:

Comment on Cursorbar by Yair Altman

Sun, 10 Sep 2017 10:48:00 +0000

Marjorie's utility mentions my webpage, where I explain the undocumented/unsupported graphics.cursorbar feature, as the source for her submission: Note that graphics.cursorbar itself was removed from Matlab in R2014b. Apparently, Marjorie took its original code, adapted it for the new graphics engine (HG2, introduced in R2014b), and extensively improved it along the way. The result is indeed very useful and capable. Some users may want to shy away from utilities that rely on undocumented/unsupported aspects, since they might stop working properly in some future Matlab release. But if you drill down into Marjorie's code you'd see that it does not rely on graphics.cursorbar (which is defunct as noted), and so her code cannot really be said to rely on undocumented features.

Comment on Trace your calls (to your methods) by Yair Altman

Sun, 10 Sep 2017 09:59:20 +0000

I apologize in advance for the self-promotion, but in 2014 I posted a File-Exchange utility that displays all the timing information logged by the built-in Profiler, more importantly the order of function calls invocation (which is not reported by the built-in profiler report), and the duration of each specific invocation (as opposed to just their total as reported by the profiler report), in a graphical manner using an interactive GUI: In addition to being graphical/interactive, the utility has the benefit of logging all function calls (including built-in ones), as well as reporting timing information in an intuitive visual manner, with interactive GUI control of the displayed detail (zoom level).

Comment on Summing and Multiplying NaNs: Use cases??? by bshoelso

Wed, 06 Sep 2017 13:10:29 +0000

@Joanne, Bruce: Thanks for the input. I'm inclined to leave them, with a note (as you suggested, Bruce). I'm still interested in hearing use cases, though. Are there rationales for adding modes 2--4 to the MATLAB functions? Cheers, Brett

Comment on Summing and Multiplying NaNs: Use cases??? by Bruce

Wed, 06 Sep 2017 13:07:06 +0000

I'd leave them, but add a section right at the front of a readme file that says "many of these routines have been replaced by built-in matlab functions. You may be better off using them rather than these."