Matlab closing automatically when plotting data or opening an existing saved figure.

8 次查看(过去 30 天)
I am running Matlab (7.5) -R2007b on Mac OSX 10.5.8. Recently I updated java (using auto update in Mac). However, after that I am unable to plot or open a figure in matlab. I can type in command window, but every time I am trying to plot something, Matlab is closing automatically. I even can't open an existing figure. Any help is most welcome.

回答(4 个)

Brian Arnold
Brian Arnold 2011-7-26
There is an incompatibility in a recent Java update (1.6.0_26) affecting MATLAB versions R2007a, R2007b and R2008a, that can be worked around by following these steps:
1. Close MATLAB, if it is running.
2. In Terminal or xterm , type:
open -a TextEdit /Applications/MATLAB_R2008a/bin/.matlab7rc.sh
In the path above, change "/Applications/MATLAB_R2008a/bin/" accordingly depending on your version of MATLAB's root folder name.
3. In the editor, navigate to Line 410 to locate:
DYLD_LIBRARY_PATH=
This line is a part of the following code in the "mac" section of matlab7rc.sh:
if [ "$DYLD_LIBRARY_PATH" != "" ]; then
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
else
DYLD_LIBRARY_PATH=
fi
4. Change the line from
DYLD_LIBRARY_PATH
to
DYLD_LIBRARY_PATH=/System/Library/Frameworks/JavaVM.framework/Libraries
For users on MATLAB R2007a and R2007b, after making the change in the "mac" section, make the same change the "maci" section (right below the "mac" section).
5. Save the changes (Command-S).
6. Restart MATLAB.
  1 个评论
Christian
Christian 2013-8-30
The problem is exactly the same as mine (R2007b on Mac OS X 10.5.8) - crash after any plotting. I tried the above, but the "mac" section of my .matlab7rc.sh file has LD_LIBRARY_PATH instead of DYLD_LIBRARY_PATH both times (otherwise the lines are as described above). The "maci" section is exactly as above. I made the change to the "maci" section, no luck. Tried the same change with LD_LIBRARY_PATH=/System/Library/Frameworks/JavaVM.framework/Libraries in the "mac" section, still no luck. No error message, just an ungraceful exit. I'd be very grateful for ideas.

请先登录,再进行评论。


Wayne
Wayne 2011-7-8
Same issue with Matlab R2007b running on Mac OSX 10.6.8. I tried installing an older version of Java, but could not get Matlab to recognize it either through the Java Preferences utility or the the environment variable JAVA_JVM_VERSION.

Marilee Nugent
Marilee Nugent 2011-7-22
I'm having the same problem as Wayne. Does no one have a solution? I'll never finish my PhD at this rate.

GeoSklivanitis Sklivanitis
Thank you Brian that really worked for me running R2008a with 10.5.8.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by