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 :
- Clear the MATLAB cache by deleting the contents of the "matlab" folder located in your user directory.
- 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:
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:
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:
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:
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