Matlab Hints

L. Larrabee Strow


You can use the matlab command hdfread to read individual variables (or list of variables) in a .rtp file as follows:

geo = hdfread(filename,'profiles','Fields',{'rlat','rlon','plat','plon'});

2 Remote Graphics using Dropbox (or equivalent)

My network link is too slow for interactive Matlab graphics. Instead I start matlab up with:

matlab -nodisplay

which allows you to plot, they just aren't rendered to the screen. Once I have created a plot (using the normal commands) I want to see I print it (png only, although that is preference for speed) and scp it to my Dropbox on spud.

My command for this is /asl/matlib/plotutils/llsprint.m You can copy that and put it somewhere you like, or into matlib. The syntax is


with no extensions. I'd call it something different since you do not want to call llsprint since it is customized for me. That means you need to change spud:Dropbox to wherever your service resides. Google Drive works well too, but with high latency.

I usually just use "test" as the filename, and keep the Mac Finder open to the file "/Users/strow/Dropbox/test.png" and it just automatically refreshes. It is very fast.

2.1 Note: Summer 2017

Dropbox is now working very well on strowinteract. It seems to stay up for days now.