Encontrei a solução no site da MathWorks, que copio abaixo em sua íntegra. Usei e funcionou:
Why does MATLAB crash when starting or when using FIGURE or PLOT after I updated my Mac OS to 10.5.8 or 10.6.8 in versions prior to MATLAB R2008b?
Date Last Modified: Friday, December 2, 2011
|Reported in Release:||R2008b|
|Operating System:||Mac OS 10.6x (Snow Leopard)|
Subject:Why does MATLAB crash when starting or when using FIGURE or PLOT after I updated my Mac OS to 10.5.8 or 10.6.8 in versions prior to MATLAB R2008b?
Problem Description:After I updated Mac OS to 10.5.8 or 10.6.8, MATLAB crashes with this message when I execute FIGURE, PLOT, or SET. On some machines this occurs with any call to FIGURE or PLOT. On other machine, it always occurs on the same line or a script or function that may contain previous calls to PLOT, FIGURE, or SET. Also, sometimes when I am starting up MATLAB:
_NSJVMLoadLibrary: NSAddLibrary failed for /libjawt.dylib
JavaVM FATAL: lookup of function JAWT_GetAWT failed. Exit
This message shows in the terminal if I open MATLAB from the terminal.
If I open MATLAB by clicking on the application, MATLAB just disappears. The same message shows in the Console. Sometimes, no crashdump files are generated.
Solution:The crash is possibly related to upgrading the Mac OS to version 10.5.8 or 10.6.8. This issue has been seen in MATLAB R2007a, R2007b, and R2008a, including both Professional and Student versions.
Configurations reported with this crash:
Mac OS 10.6.8 with Java 1.6.0_26
Mac OS 10.5.8 with Java 1.5.0_30
Please note that OS 10.6 is not officially suported for MATLAB R2007a, R2007b, and R2008a. Check the System Requirements for a particular MATLAB version here:
If upgrading to a newer version of MATLAB is an option, upgrading MATLAB to versions R2008b or above would fix the crash.
If upgrading is not an option, as a workaround, replace a statement in the matlabrc.sh file as follows:
Close MATLAB, if there is any session open.
Locate the file, 'matlabrc.sh' as follows:
In Terminal or xterm , type:
open -a TextEdit $MATLABROOT/bin/.matlab7rc.sh
in which $MATLABROOT is the output of "matlabroot" from the MATLAB command prompt.
For example, for MATLAB R2008a:
open -a TextEdit /Applications/MATLAB_R2008a/bin/.matlab7rc.sh
Open the matlabrc.sh file in the editor to replace a line as follows:
1. Navigate to Line 410 to locate:
This line is a part of the following code in the "mac" section of matlab7rc.sh:
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
2. Change the 4th line in the code mentioned above from
For users on MATLAB R2007a and R2007b, after making the change in the "mac" section, make the same change the "maci" section. This section is right below the "mac" section.
For users on MATLAB R2008a, directly go to Step 5.
Save the changes by pressing "Command" + "s" keys.