MATLAB Answers

How to disable a toolbox

30 views (last 30 days)
Gus C
Gus C on 25 Jun 2020
Edited: Image Analyst on 5 Jul 2020
How can I disable a particular toolbox? I have my own code, in which I am using a function 'diffusion', which is preceded, possibly by a function from financial toolbox. Running it on my home PC terminates successfully, but on HP cluster it throws an error, confusing the two functions (saying e.g. that I give too many input arguments).

  0 Comments

Sign in to comment.

Accepted Answer

Matt J
Matt J on 25 Jun 2020
Add all your code to the top of the Matlab path using addpath
Then, Matlab will see your version of diffusion first, and use that.

  7 Comments

Show 4 older comments
Matt J
Matt J on 5 Jul 2020
You could also consider making your version of diffusion a private function,
This way, no import statements would be necessary, but note that your diffusion() would then be visible only to functions in the private/ folder and its parent.
Gus C
Gus C on 5 Jul 2020
Ok, thanks a lot!
Matt J
Matt J on 5 Jul 2020
You're welcome, but please Accept-click the answer if you consider your question addressed.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 5 Jul 2020
Edited: Image Analyst on 5 Jul 2020
To disable an entire toolbox -- ALL of it's functions -- you can uninstall it from the Add-On Manager (Home tab of Toolbar -> Add-ons -> financial toolbox -> three dots -> Uninstall). I don't think it actually deletes the files. It's not quick, like a one-liner you can do in your code. Then to turn it back on, you again use the Add-on Manager to re-enable it.

  0 Comments

Sign in to comment.

Products


Release

R2019b