Hi Suraj,
This may be the result of the Path Environment Variable having too much data already to have the necessary directory added.
1) Locate the MATLAB Runtime Directory:
- By default, the runtime directory is “C:\Program Files\MATLAB\MATLAB Runtime\v<number>\runtime\win64”. If you’ve installed MATLAB in a different location, find the corresponding directory.
2) Access Advanced System Properties:
There are two ways to do this:
- Type “Environment” in the Start menu search and click “Edit the system environment variables” when it appears.
- Open Control Panel, navigate to (System and Security) > System > Advanced System Settings.
3) Edit Environment Variables:
- In the “System Properties” window, click “Environment Variables.”
- Under “System variables,” find the variable named “Path” and click “Edit.”
4) Add the MATLAB Runtime Directory:
- In the “Edit environment variable” window, you’ll see a list of directories.
- Look for the directory from step 1. If it’s already in the list exactly, skip to the next step.
- If not, click “New” and add the directory.
5) Handle Environment Variable Size Limit:
- After clicking OK, you might encounter an error saying “This environment variable is too large.”
- Create a new system variable called “Path2” with the same directory value (followed by a semicolon).
- Add “%Path2%” to the original “Path” environment variable (including the percent signs).
6) Uninstall and Reinstall MATLAB Runtime:
- Sometimes this issue causes missing files in the MCR installation.
- Uninstall the MCR using “C:\Program Files\MATLAB\MATLAB Runtime\v<number>\uninstall\bin\win64\uninstall.exe” (default path) and then reinstall it.
Hope this helps.
Regards,
Ninad