Help: Matlab takes forever with unrecognized commands, how can I fix this?

4 次查看(过去 30 天)
Lately I have been having a problem where if I mistype a command or variable in the command window, it will take forever to respond. For instance, I tried typing "igure" to open a new figure window and Matlab went into busy mode for 6 minutes(!) before it came back with:
Unrecognized function or variable 'igure'.
Did you mean:
>> figure
Six minutes. I don't ususally mistype commands (heavily relying on the tab key and the up arrow), but this is ridiculous. What's happening and how can I fix it?
  7 个评论
Karim
Karim 2022-7-6
I've had a similair problem in the past, it was solved by Matlab support via a service request. See below for a snippet from their mail with the steps they proposed. Hope it helps.
When MATLAB remains Busy for a while, apparently doing nothing, this is usually caused by a licensing issue; MATLAB may be trying to contact a license server which does not/no longer exist(s). Please see the following article on our website which describes this issue in more detail, and which explains how you can confirm whether you are indeed running into this issue and what you can do about it:
If this does not resolve the issue, it is also possible the issue is related to your MATLABPATH; it may contain network paths which either again no longer exist or which are simply slow to be accessed. Please check the MATLABPATH and try removing network locations, does that make a difference?
Finally, the issue may also be related to a corruption in MATLAB preferences; you would resolve such an issue by resetting your MATLAB preferences. To do this, delete the MATLAB preferences directory. To find the location of this directory you can run "prefdir" in the MATLAB Command Window.
Alan Hoskins
Alan Hoskins 2022-7-6
It does appear to be a licensing issue. I have not solved it yet, but it is good to know where to look.

请先登录,再进行评论。

采纳的回答

Alan Hoskins
Alan Hoskins 2022-7-6
编辑:Alan Hoskins 2022-7-6
I found the answer in the link that Karim posted:
It was posted by Ryan Gray, and I quote:
Another possibility is that due to corporate configuration, the AppData folder gets stored on a network share, and MATLAB stores its preferences folder there by default. This can make it very slow to unusable. You will have to set the MATLAB_PREFDIR environment variable to point to a local folder. If your IT is very restrictive, you may only be able to locally write in C:\Users\%USERNAME%, so make a folder there. Just remember that the contents are particular to each MATLAB version. These day, it seems common to have the Documents folder on a network redirect as well, so you might have to consider changing your userpath to something local as well. I would also check that TMP and TEMP folders are local rather than on a network path.
This was indeed the issue. Specifically, I had to make an MATLAB_PREFDIR environment variable that pointed to a location on my C:\ drive.

更多回答(1 个)

Jon
Jon 2022-7-6
I had this problem and found it was caused by some interaction with "MATLAB Drive" and "MATLAB Drive Connector". As soon as I stopped using the MATLAB Drive, the problem went away.
  3 个评论
Alan Hoskins
Alan Hoskins 2022-7-6
No problem, I am always amazed at how much I don't know about MATLAB when I use it almost every day.

请先登录,再进行评论。

类别

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

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by