Message: requires Optimization Toolbox.
32 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Some time ago I reported that I was not getting a message saying that "requires Optimization Toolbox." for new scripts even for scripts as simple as x=1. It seemed solved before by running as an administrator. Today I tried again and found the same problem and running as an administrator did not help. I even downloaded and install the current version from the website. I need to get some work done. Perhaps I need to go back to a 2022 version?
1 commentaire
Réponses (1)
Shreshth
le 3 Jan 2024
Hello Jim,
I can understand that you are having problem in writing scripts getting an error of ‘Optimisation Toolbox required’ even for simple assignments. And you have also mentioned that this problem was resolved when you ran the software previously as administrator.
To start with you can use MATLAB built in commands to reset the search path and refresh the toolbox cache. Here are the steps you should follow:
- Restore Default Path: Run the following command in MATLAB to reset the search path to its default settings:
restoredefaultpath;
2. Rehash Toolbox Cache: After restoring the default path, refresh MATLAB's toolbox cache with the following command
rehash toolboxcache;
By executing these two commands, you are ensuring that MATLAB's path is set to include all default directories and that the toolbox cache is up-to-date, which could resolve potential path or cache-related issues.
If you've tried these commands and the issue still persists, proceed with the following additional steps:
- Check Toolbox Installation: Use the ‘ver’ command in MATLAB to verify that the Optimization Toolbox is actually installed.
- Licensing Issues: Make sure that your license for the Optimization Toolbox is valid and active.
- MATLAB Path: Use the ‘pathtool’ command to ensure that the toolbox directories are included in MATLAB's search path.
- Compatibility Check: Confirm that the version of MATLAB you are using is compatible with the installed version of the Optimization Toolbox.
- Revert to an Older Version: If the problem began after updating MATLAB, consider reverting to a previous version where you did not encounter this issue.
- MATLAB Preferences: If none of the above solutions work, try resetting MATLAB's preferences by renaming the preferences directory. MATLAB will create a new directory with default settings upon restart.
If you are facing any issue in installing the optimization toolbox , you can refer to the below link for further reference.
Finally, if you have exhausted these options and the problem is still unresolved, it would be advisable to contact MathWorks support for further assistance.
Thank you,
Shubham Shreshth.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!