Message: requires Optimization Toolbox.

18 views (last 30 days)
Jim
Jim on 27 Oct 2023
Answered: Shreshth on 3 Jan 2024
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?

Answers (1)

Shreshth
Shreshth on 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:
  1. 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:
  1. Check Toolbox Installation: Use the ‘ver’ command in MATLAB to verify that the Optimization Toolbox is actually installed.
  2. Licensing Issues: Make sure that your license for the Optimization Toolbox is valid and active.
  3. MATLAB Path: Use the ‘pathtool’ command to ensure that the toolbox directories are included in MATLAB's search path.
  4. Compatibility Check: Confirm that the version of MATLAB you are using is compatible with the installed version of the Optimization Toolbox.
  5. 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.
  6. 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.

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!