matlab process is too slow

217 次查看(过去 30 天)
Mahmoud Wagdy
Mahmoud Wagdy 2018-1-18
my laptop specs is kindly high 8GB Ram core i7 Nvidia 840m but matlab commands is slow for example i did 5+5 that took 7 minute to get the answer ps : Solidworks and some High games are working perfectly
  2 个评论
Image Analyst
Image Analyst 2018-1-18
You have not asked a question, but I will. What is "5+5"? If you have code you want people to test/time, post it.
Mahmoud Wagdy
Mahmoud Wagdy 2018-1-24
i mean why it's too slow

请先登录,再进行评论。

回答(4 个)

Andrew Wingard
Andrew Wingard 2019-3-7
I had a similar problem on my mac, this was ultimately related to an app called Magnet I purchased through the app store. If you are running magnet, I suggest uninstalling the application and running matlab.
  7 个评论
Paul Kaufmann
Paul Kaufmann 2021-4-9
Wow, I can't believe how much this impacted the responsiveness of Matlab on my M1 Mac.
Before, it was basically unusable, because any input took like 1sec to register with the app; now it's more or less instant. It still is noticably slower than any input in a "native" Mac app (it's all Java, after all), but still: disabling Magnet was a huge improvement.
Thanks for the tip!
Lauren Taylor
Lauren Taylor 2022-6-23
This worked for me as well!

请先登录,再进行评论。


Cam Salzberger
Cam Salzberger 2018-1-18
Hello Mahmoud,
Does this running of 5+5 take a long time just once, then MATLAB is sufficiently fast for the rest of the session? If so, are you making sure to wait until MATLAB is done "Initializing" before you enter code or try to do anything?
If MATLAB is slow every time you enter a command to run during a session, then it could be that MATLAB is having trouble finding your license, or is otherwise slow during your license check. Try out "Solution 1" in the answer here. Despite being for an older version of MATLAB, the specification of the license file with "-c" is still applicable, though the license file itself may have changed depending on your version (.lic now, I believe).
"Solution 2b" in that article is good to check too.
Depending on your version of Windows (I'm assuming Windows here), it's also worth checking out if compatibility mode can help (as mentioned here).
If all that still isn't doing it, can you give us which MATLAB release you have installed, which OS you are using, and if this is a new problem with an old installation, or if MATLAB has always been this way on this machine?
-Cam
  1 个评论
Cam Salzberger
Cam Salzberger 2018-1-29
Hey Mahmoud,
Since it's a slow initialization issue, I'll definitely recommend looking into scheduling the MATLAB Startup Accelerator if you're on a Windows machine. This will preload a lot of the material before you try to launch MATLAB, so when you actually launch it, it will start faster. The performance should be comparable to when you close MATLAB, and then start it up again soon after.
If that doesn't do the trick, I'd suggest looking to see if you have a "startup.m" file on the MATLAB path:
which -all startup
If you have a script that's running a lot of commands, or any commands that run slowly, this will slow down initialization time.
There are a few other tips here as well.
For more diagnostic information, you can start MATLAB from Command Prompt (Windows) or a terminal (Unix) with the -timing startup flag:
matlab -timing
Or the -timing+ flag on Unix systems for earlier releases of MATLAB.
This will tell you the breakdown of how the startup time is being spent. If you can't see anything yourself, contacting tech support with the timing details should help you get an answer faster.
-Cam

请先登录,再进行评论。


Mahmoud Wagdy
Mahmoud Wagdy 2018-1-24
Hello Cam, i found that matlab was Initializing but it takes long time like 15 min but after all commands works good

Andrew Wingard
Andrew Wingard 2018-10-26
Does anyone know how to solve this same problem but with a MacBook? The solutions online all assume a windows machine.
  2 个评论
Rik
Rik 2018-10-26
Please only use the answer field for answers. You should either post this as a comment, or as a separate question (in which case you should link to this question).
To reply to your question: I have hardly ever worked with Mac, so I would have to Google it as well.
Andrew Wingard
Andrew Wingard 2018-10-26
编辑:Andrew Wingard 2018-10-26
Thank you for the response, its my first time asking a question. I have added a new question but for MacBooks under the link below.
https://www.mathworks.com/matlabcentral/answers/426331-matlab-slow-initiating-any-command-including-just-clicking-on-mac

请先登录,再进行评论。

类别

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