sysgen和matlab不匹配,AR# 45322: 13.3 SysGen - Why does SysGen/Matlab hang or take a long time to launch?...

Solution:

There are a few reasons why MATLAB can hang at initializing.

==============

Licensing issues:

==============

Option 1

========

If MATLAB starts, but remains in the "Initializing" state, MATLAB may be searching for additional licenses on your system.

This may be caused by an environment variable named LM_LICENSE_FILE. This variable tells MATLAB and other flexlm applications where to find the license file. MATLAB may also hang if you have a network license for some features and you disconnect from the network.

NOTE: There may also be an MLM_LICENSE_FILE variable as the root of this issue. This variable works only for MATLAB.

To fix this problem, you can do the following:

Windows

========

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 license file for MATLAB. If you are not sure where that file is located, see the related solution: "Where are the license files for MATLAB located?" linked below. 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.

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

Option 2

========

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

Windows

========

1) Right-click on a shortcut to MATLAB and select "Properties"

2) In the "Target" field, enter the following:

"$MATLAB\bin\win32\MATLAB.exe" -c "

Where $MATLAB is the root MATLAB directory and is the absolute path to your license file. If you are not sure where this is located, see the related solution: "Where are the license files for MATLAB located?" linked below.

3) Click "OK".

4) Launch MATLAB from the shortcut.

This method also works for System Generator shortcut: in the target field please append the -c to the existent command:

C:\Xilinx\Vivado\2013.2\bin\sysgen.bat -c "C:\Program Files\MATLAB\R2012b\license.lic"

For Linux, Unix, or Mac

===============

Use a -c switch to point directly at the license file when launching.

If the MATLAB installer has created symbolic links, run

matlab -c

If symbolic links were not created, run from $MATLAB/bin/

./matlab -c

Where $MATLAB is the root MATLAB directory and is the absolute path to your license file, likely in your $MATLAB/licenses directory.

=================

Non-licensing issues:

=================

Solution 1:

============

Recreate MATLAB preferences by doing the following:

On Windows

========

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

1) Quit MATLAB. Ensure that MATLAB is no longer running.

2) Browse to the folder c:\Documents and Settings\ \Application Data\MathWorks\MATLAB\ OR c:\users\\AppData\Roaming

3) Rename the directory named after the version of MATLAB you are using to have _old at the end. If there is a folder with "_licenses" in the name, DO NOT rename that folder.

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

On 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.

If that does not resolve the issue, there is a known issue with MATLAB 7.0 (R14) on Windows 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 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.

Solution 3:

============

If you have MATLAB R2007a, there is a bug that prevents MATLAB from starting. For more information about that bug, see the bug report here:

http://www.mathworks.com/support/bugreports/details.html?rp=366601

If none of these solutions resolved your performance concerns, or if you have a concern with the performance of a specific feature, contact Technical Support using the following URL:

http://www.mathworks.com/support/contact_us/ts

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值