Thanks for this, it works exactly as advertised. One thing I'd like to do is match for a sequence of 2 directories (i.e. exclude a/b but include a/c and d/b). This doesn't seem possible from within genpath, but might be possible by parsing the output from genpath. According to the comments, you already did this in an older version. Would you be able to put this on the file exchange please? Or does anybody know how to access file history here?
I think I have found a way to modify cbfreeze.m to fix the problem of colorbars changing size and losing their label. Does anybody know how to upload a new version? I'll try emailing Carlos directly aswell.
Excellent submission! I just managed to reproduce Mohinder's error (No static serializeXML method with appropriate signature exists in Java class com.mathworks.xml.XMLUtils). In my case it was caused by trying to run xmlwrite instead of xml_write.
Great functionality for those of us with pre-2011b versions. I had the same error as Vincent, and his solution worked for me too. Off the top of my head I couldn't figure out how to do the lshift and rshift, but I don't actually need them.
Using with colorFreeze, this work well. However using it along with a 3d plot (surf)causes the colorbar to have a LOT of numbers all around the figure... This is a shame though since my only use is for such usage...
Thank you all for your comments. Now the scientific notation 'x10' issues are fixed (well I guess so), and a new way to write it included: using International System Units' prefixes (mega, kilo, etc.).
Cheers, Carlos A.
The function works very nicely, especially in combination with the freezeColors function :-)
However, it doesn't work with the lcolorbar. I'm mainly interested in this because I use colors to encode/visualize categories rather than actual values, where lcolorbar is very easy to add a label. Any quick fix in mind? I'll try to fix it by adding labels on the normal colorbar manually in the meantime.