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.
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.
Has anybody been able to address the order of magnitude question from Jenny (20 Nov 2013)? I'm having the same issue where I have a colorbar with a '10^-6' on the top right which disappears upon the cbfreeze command. I don't know how to fix this.
Hello Carlos Adrian Vargas Aguilera,
My name is Felipe Orellana, a graduate student here at Univ. California at Berkeley. I am doing a PhD in Geophysics, more specifically, I do numerical simulations in plate tectonics.
Man, thanks a lot !!!
your routine is awesome ! a piece of art in matlab programing.
thanks man, you are very helpful,