概述
Matlab升级以后,功能的确丰富了好多,有些函数也更加人性话了,好多bug也没有了。但是可恼的是,这个该死的家伙却一天比一天肥,MATLAB7.6a居然达到了3.76G,启动和打开某些窗口,速度明显不行了,真是尾大不掉呀。
下面我们说说,MATLAB初始化initializing极慢解决方法,但是可能导致Matlab启动的初始化很慢原因很多,这里我们只能对常见的集中可能的原因进行分析:
一、License方面原因
问题原因:
由于Matlab启动的时候会搜索Matlab的License文件,而计算机系统变量LM_LICENSE_FILE,则是用来告诉所有的应用程序从哪里找到对应的License文件
另外系统变量LM_LICENSE_FILE也可能导致初始化很慢,但是该变量只对Matlab负责,LM_LICENSE_FILE是对所有的程序负责
但是假如你的Matlab使用的是网络版的License,你计算机没有联网当然没法找到那个network license
解决方法:
方法一
windows
(1)右击【我的电脑】选择【属性】
(2)在【高级】选项卡中,点击【环境变量】
(3)在下面的【系统变量】找到【LM_LICENSE_FILE】,如果没有,点击【新建】创建一个变量名为LM_LICENSE_FILE的变量
(4)将LM_LICENSE_FILE的属性值设置为Maltab的License文件的绝对路径
(5)重启Matlab
Unix,Linux,or Mac
Check to see if there is an environment variable set. Where this is
located depends on the shell you are using. Look in your home
folder. This file may be called: .cshrc (c-shell), .profile (bash),
or .bashrc (bash)
You can also create an environment variable for that shell session
from the command line using export or setenv (depending on your
shell), but the above file needs to be edited for a permanent
change.
For example:
export MLM_LICENSE_FILE /usr/bin/matlab/license.dat
复制代码
方法二
如果你只有一个License,那么你可以当Matlab启动的时候,在Maltab快捷方式或者命令行中指定License路径
windows
(1)右击Matlab快捷方式,选择【属性】
(2)在【目标】中,键入如下内容
"$MATLABbinwin32MATLAB.exe" -c "
the MATLAB license file including file name>"
复制代码
其中$MATLAB是Matlab安装根目录,可以在Matlab中键入matlabroot得到,
to the MATLAB license
file>是License文件的绝对路径
(3)重启Matlab
Unix,Linux,or
MacUse a -c switch to point directly at the
license file when launching.
If the MATLAB installer has created symbolic links, run
matlab -c
including file name>
复制代码
If symbolic links were not created, run from $MATLAB/bin/
./matlab -c
file including file name>
复制代码
Where $MATLAB is the root MATLAB directory and
to the MATLAB license file> is the absolute path to
your license file, likely in your $MATLAB/licenses directory.
二、preferences方面原因
问题原因:
preferences首选参数设置的不得当,或者文件太大,Matlab启动的时候加载preferences设置需要较长时间
解决方法:
进行如下操作,需要确保您有查看隐藏文件的权限
windows
(1)退出Matlab,一定要确保Matlab不再运行
(2)进入
c:Documents and Settings
username>Application DataMathWorksMATLAB
复制代码
其实该路径可以在Matlab中键入prefdir得到
(3)将上述路径中,以Matlab版本号为文件名(比如R2008a)的文件夹,重命名为R2008a_old(其实这一步是在备份preferences文件)
(4)重启Matlab,此时predir下会重新创建一个R2008a文件夹,里面包含了所有的preferences设置,只是属性值都是默认的,当然以前对Matlab的设置全部没有了
(5)如果觉得不满意,那么将新生成的R2008a删除,将R2008a_old重新改为R2008a就可以了
Linux, Unix, or Mac
1) Quit MATLAB. Ensure that MATLAB is no longer running.
2) Rename the ".matlab/" directory in the users home directory, to
".matlab_old/".
3) Restart MATLAB.
三、其他方面原因
1、Matlab7.0(R14) for windows
由于部分显卡的图形库对内存使用效率不高,导致Matlab7.0长时间多频率的调用虚拟内存,具体参见http://www.matlabsky.com/thread-831-1-1.html
2、Matlab7.4(R2007a) for
windoes,由于存在Matlab自身的bug导致Matlab没法启动或者长时间处于初始化状态,参见
http://www.matlabsky.com/thread-833-1-1.html
3、有部分用户反应杀毒软件会减慢Matlab运行,此时我们将Matlab的安装路径排除在杀毒软件的主动扫描范围内
最后
以上就是美丽小甜瓜为你收集整理的matlab初始化很久,【原创】Matlab初始化initializing极慢解决方法的全部内容,希望文章能够帮你解决matlab初始化很久,【原创】Matlab初始化initializing极慢解决方法所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复