matlab启动慢的解决方法

常用方法见文中高亮部分

Matlab随着版本的升级体积越来越大,带来的问题就是启动速度也越来越慢,下面就我注意到的几个影响MATLAB启动速度的问题集中和大家分析下解决办法。 亲测有用!!!
**

一、preferences方面原因

**
问题产生原因:
大家都知道,preferences参数很多,如果首选参数设置的不得当,或者文件太大,Matlab启动的时候加载preferences设置就需要较长时间
问题解决方法:
以管理员权限登录,以保证自己有查看隐藏文件的权限。
windows
(1)退出Matlab,一定要确保Matlab不再运行
(2)进入c:\Documents and Settings\ \Application Data\MathWorks\MATLAB\ 复制代码真实该路径可以在Matlab中键入prefdir得到
(3)将上述路径中,以Matlab版本号为文件名(比如R2009a)的文件夹,重命名为R2009a_old(其实这一步是在备份preferences文件)
(4)重启Matlab,此时predir下会重新创建一个R2009a文件夹,里面包含了所有的preferences设置,只是属性值都是默认的,当然以前对Matlab的设置全部没有了
(5)如果觉得不满意,那么将新生成的R2009a删除,将R2009a_old重新改为R2009a就可以恢复以前的设置了。

二、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

方法二
如果你只有一个License,那么你可以当Matlab启动的时候,在Maltab快捷方式或者命令行中指定License路径
windows
(1)右击Matlab快捷方式,选择【属性】
(2)在【目标】中,键入如下内容”KaTeX parse error: Undefined control sequence: \bin at position 7: MATLAB\̲b̲i̲n̲\win32\MATLAB.e…MATLAB是Matlab安装根目录,可以在Matlab中键入matlabroot得到, 是License文件的绝对路径
(3)重启Matlab

附英文:
Subject:
Why does MATLAB get stuck in the ‘Initializing’ state or take a long time to start on a Windows machine?

Problem Description:
MATLAB opens but the status states ‘Initializing’ for a long time. MATLAB takes a long time to launch with or without a remote license manager.

Solution:

Licensing issues:

If MATLAB starts, but remains in the “Initializing” state, MATLAB may be unable to find the licenses on your system. This may be caused by an improperly set environment variable named LM_LICENSE_FILE. This variable tells MATLAB and other flexlm applications where to find the license file. If this variable is set improperly, MATLAB may search for a license for extended periods of time. Also if you become disconnected from the network and you access a network license for toolboxes, MATLAB will hang if this variable is not set correctly.

This slow startup can also happen if you have a standalone license for MATLAB, but have the LM_LICENSE_FILE variable set for a different FLEXlm application.

NOTE: There may also be an MLM_LICENSE_FILE variable. This variable works only for MATLAB, but MATLAB will still read LM_LICENSE_FILE if it is set before it reads MLM_LICENSE_FILE. If you have an MLM_LICENSE_FILE variable, you may get better performance by switching to LM_LICENSE_FILE

In either case, to fix this problem please do the following:

  1. Right-click on the “My Computer” icon and go to “Properties”. (You may also do this by going to the Control Panel and double clicking “System.”

  2. Go to the “Advanced” tab and click on “Environment Variables”

  3. Under the bottom window, System variables, look for a variable named LM_LICENSE_FILE

  4. If there is an LM_LICENSE_FILE variable already set, skip to step 5. If there is not, create an LM_LICENSE_FILE variable by clicking “New” and typing “LM_LICENSE_FILE” in the Variable name box.

  5. Set the LM_LICENSE_FILE variable to the absolute path of the MATLAB license.dat file for your standalone license first. The license file should be in the $MATLAB/bin/win32 directory, where $MATLAB is the root MATLAB directory. If there is more than one license file, put a semi-colon (😉 after the first path, then type the path to the next license file. Click “OK” to save.

  6. Launch MATLAB again.

Option 2

Alternatively, if you use only one license to access MATLAB and toolboxes, you can specify the license file in the MATLAB shortcut. To do so, follow these steps:

  1. Right-click on a shortcut to MATLAB and select “Properties”

  2. In the “Target” field, enter the following:

KaTeX parse error: Undefined control sequence: \bin at position 11: MATLABROOT\̲b̲i̲n̲\win32\MATLAB.e…MATLABROOT\bin\win32\license.dat”

(where $MATLABROOT is the root MATLAB directory)

  1. Click “OK”.

  2. Launch MATLAB from the shortcut.

=================
Non-licensing issues:

(Make sure you have enabled viewing of hidden files and folders first)

  1. Browse to the folder c:\Documents and Settings\ \Application Data\

  2. Remove the directory named “MathWorks”

  3. Once this has been removed, restart MATLAB. This directory will be recreated the next time you start MATLAB.

If that does not resolve the issue, there is a known issue with MATLAB 7.0 (R14) and the graphics libraries supplied with certain graphics cards, which do not use memory efficiently, and cause MATLAB 7.0 (R14) to use virtual memory more frequently than would be expected. In this case, disabling the hardware graphics acceleration features of the card may improve the performance of MATLAB 7.0 (R14). To do so, follow the steps below.

  1. Close MATLAB.

  2. Right-click on the Windows desktop, and select “Properties”.

  3. In the Display Properties window that opens, select the “Settings” tab, and then click on the “Advanced” button.

  4. In the window which opens, select the “Troubleshoot” tab.

  5. Set the “Hardware acceleration” slider all the way to the left, to “None”.

  6. Click “OK” in this window, and then click OK again in the Display Properties window.

  7. Restart MATLAB.

Solution 2:

In some instances, customers have reported that the anti-virus application on their machine, which was working in the background, was slowing down MATLAB. For these customers, disabling the active scan option for at least the MATLAB directories improved performance substantially.

  • 12
    点赞
  • 42
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值