Allen J. Hall

Materials Science & Engineering, Productivity, and Life

Tag Archives: Matlab

Matlab doesn’t open two windows? - Here’s a fix.

After finally installing Leopard (10.5) osX on my Powerbook G4 (Thesis writing computer), I noticed a strange behavior with MATLAB. MATLAB could no longer open more than one instance of itself. As well, it could no longer open a window once it had opened once in any login session. Strange behavior indeed.

Well, here’s the fix… it turns out that Leopard uses launchd to set the display. So, the old method of launching MATLAB was to set the display to 0.0, but this will fail after the first instance, hence the bug. What you can do is simply remove this line from the startup script in matlab (located within the startup application contents).

The line that was:

$SHELL -c 'bin/'$ARCH'/setsid bin/matlab -desktop -display :0.0 &'

should now be:
$SHELL -c 'bin/'$ARCH'/setsid bin/matlab -desktop &'

Once I changed that, everything started up fine! :)

ps- you will know you have this problem if you look at your console log immediately after launching MATLAB and it says something like:
6/29/10 9:03:34 AM [0x0-0x78078].StartMATLAB[23469] Warning: Unable to open display :0.0, MATLAB is starting without a display.

MATLAB and reciprocal space mapping - small update.

Well, I’m one of those guys who believes a picture is usually worth a ton of words. I’ve got a few images to share here on the matlab code I’ve been working on for reciprocal space mapping in MATLAB. I’m still not 100% on my code right now, so I’m not sharing it for the time-being. In particular, I use an import function for .x00 slices for two-axis scans in the Panalytical/Philips XPert system. If you are using XRDML, skip the files for .x00 import that I have in other posts on this blog. In anycase, without much explanation here are the images…

surfacetestusingallomegas2

surfacetestusingallomegas3

qspaceorigtranslateweachomegaload

A Quick Introduction...

I'm a graduate student (PhD Candidate) at the University of Illinois at Urbana-Champaign. I've studied and researched in two fields of Materials Science and Engineering (Polymers and Semiconductors). My interests are as diverse as my musical tastes and I usually have my hand in some crazy project during my free time. I'm available for consulting and have access to a world-renown materials research user-facility supported by the D.O.E. If you would like to know more, please contact me.

Popular Tags