The Enlightenment Problem of MATLAB and Simulink

1 view (last 30 days)
Hello, when I restart the 2023 version of MATLAB after a period of inactivity or shutdown, it becomes particularly slow. It takes about six or seven minutes to open MATLAB. If I want to continue opening Simulink, it will take about 11 minutes, which greatly affects my work efficiency. Is there any solution

Accepted Answer

Vandit
Vandit on 1 Jun 2023
Hi,
The slow opening times for MATLAB and Simulink after a period of inactivity or shutdown may be caused by a variety of factors, such as accumulated cache files, automatic updates, or insufficient hardware resources.
Below are some of the suggestions that you can try to resolve the above problem :
  1. Clear the MATLAB cache by deleting the contents of the "matlab" folder located in your user directory.
  2. Disable unnecessary plugins using the steps below:
  • Open MATLAB.
  • Go to the "Home" tab in the MATLAB toolstrip.
  • Click on the gear icon in the top right corner of the window.
  • Select "MATLAB >> Add-On Manager" from the menu.
  • Disable any plugins or toolboxes that you do not use or require.
  • Click on "Apply" and then "OK"
3.Disable startup files that are not required for your workflow
4.Upgrade your hardware.
Moreover in order to improve the startup time of MATLAB and Simulink, please follow the steps below:
1. As a diagnostic tool, you can use the "timing" run-time option to get more information about which specific portion of the startup is slow. To do this, you can run MATLAB from the Windows command prompt:
(a) Click on the Windows "Start" menu, type in "cmd", and press "Enter"
(b) Inside the command prompt, navigate to the "bin" folder inside the MATLAB R2020b directory:
cd C:\Program Files\MATLAB\R2020b\bin
(Note that you may need to adjust this path for your system)
(c) Execute the following command inside the Windows command prompt window:
matlab -timing
This will start MATLAB and automatically record the time taken for each startup task. When the startup completes, you will see a log outputted inside the MATLAB Command window that summarizes the timing results. Note that this will also create a text log file noted at the top of the output.
2. In the output of the timing results from Step (1) above, check if the "InitSunVM" task is taking a large amount of time to complete. If so, this might be related to the McAfee Virus Protection. If this is applicable to your system, there is a MATLAB Answers post that details a quick fix to resolve this issue:
3. If the "LM Startup" task is taking a large amount of time, this could be due to licensing issues. To try and resolve this:
(a) First locate your license file. See the page below for detailed instructions on doing so:https://www.mathworks.com/matlabcentral/answers/99147-where-can-i-find-matlab-license-files
(b) Start MATLAB from the command line, and use the '-c' flag to point to your license file. See the documentation below for more information on using this flag:https://www.mathworks.com/help/releases/R2020a/matlab/ref/matlabwindows.html#input_argument_d0e626864
NOTE: If you are using MATLAB R13 or prior, you will need to set the 'MLM_LICENSE_FILE' or 'LM_LICENSE_FILE' environment variable instead:
Go to environment variables. If there is a variable called 'MLM_LICENSE_FILE' or 'LM_LICENSE_FILE' in system variable, replace the value of the variable by the path of the '.lic' file e.g 'network.lic' file. To get the path of 'network.lic' file execute the following command in MATLAB Command window:
feature lmsearchpath
4. Check if you have code being executed in your "startup.m" file. To access this, you can execute the command below inside the MATLAB Command Window:
edit startup.m
If the file is not empty, you can go through the code to determine if any function calls or operations inside may be slowing your startup procedure.
5. In the MATLAB Toolstrip, click on "Home" and then on the "Preferences" button. Inside the "Preferences" window, select "MATLAB -> General" on the left-hand side. On the right-hand side, verify that "Enable toolbox path cache" is enabled (it should be enabled by default).
6. Also inside the "Preferences" window, select "MATLAB -> General -> Source Control". If you do not use any form of source-control integration, you can select "None" on the right-hand side and then apply the changes.
Hope this helps.
Thanks

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!