MATLAB Answers

0

Where should we install third-party toolboxes under Windows?

Asked by David McFarlane on 5 Sep 2019
Latest activity Edited by per isakson
on 7 Sep 2019
Where should we install third-party toolboxes under Windows?
I have seen several opinions ...
(1) All toolbox folders should be in the same place where MATLAB already installs its own toolboxes and where anyone would naturally expect to find them, e.g., 'C:\Program Files\MATLAB\R2018b\toolbox\'.
(2) No, that is a protected file space and should not be messed with except by the MATLAB installation itself. Instead, install third-party toolboxes to folders under '%MATLABStartUpFolder%\Toolboxes\', e.g., 'C:\Users\UserName\Documents\MATLAB\Toolboxes\'. This is similar to what *nix does, and is what the new *.mltbx facility does by default.
(3) No, that would make those toolboxes available only to that user, we want these toolboxes available to all users. So install third-party toolboxes to folders underneath a single toolbox folder off of the root, e.g., 'C:\Toolboxes\'.
(4) No, you should not start adding folders off of the root for every application that wants one, that just gets messy. Instead, make one generic folder off the root for all such purposes, e.g., 'C:\ProgramLocal\', and then add all other toolboxes and other specialized/custom application folders there, e.g., 'C:\ProgramLocal\Toolboxes\'.
Please weigh in. Thanks.

  0 Comments

Sign in to comment.

Products


Release

R2018b

3 Answers

Answer by per isakson
on 7 Sep 2019
Edited by per isakson
on 7 Sep 2019

That depends
  • Are you connected to a local network? Do you have a your own drive on a local server?
  • Are the local workstation shared by several users?
  • How is back-up done?
  • and more
(1) NO!
(2) I don't think 'C:\Users\UserName\Documents\MATLAB\Toolboxes\') is a good idea. However, with Preferences|General|Add-Ons you can choose where you want to install mltbx and mlapp files. Choose a folder that is available to all users. IMO you should definately do as Matlab recommends regarding mltbx and mlapp files.
(3) Not applicable
(4) "applications" can be very different. What do you mean by "root"? "that just gets messy" on the contrary a lot of unrelated m-files in one folder that's messy. "not start adding folders" and "add all other [... ] application folders" ???
Maybe we agree. Besides the Matlab installation I have all my Matlab stuff in subfolders of D:\m. All "mltbx and mlapp applications" are in subfolders of D:\m\AddOns. Other downloads from the File Exchange are in subfolders of D:\m\FEX, etc. (I guess these folders says something about my age.)
I try to adapt the search path as needed. I add "specialized application" only when needed.That way the tab-completion becomes more useful. Strange error messages because of name collosion cannot be avoided.
(5) C:\Users\Public\Documents\MATLAB\Toolboxes\ and C:\Users\UserName\Documents\MATLAB\Toolboxes\ make sense together with a server and VPN.
Jan and others have discussed this topic, but I fail tot find the relevant Questions

  0 Comments

Sign in to comment.


Answer by Rik
on 5 Sep 2019

My personal preference would be to pick 2 or 4. In general users messing with their copy of Matlab causes headaches. The advantage of picking an external folder is that it is easy to reinstall Matlab and add the path to your custom toolbox.
My issue with option 3 is that it is too generic to be recognizable. Depending on what else is going to happen on that machine, I might argue 'C:\MatlabPrivateToolboxes\' is acceptable, but that becomes messy fast if you have multiple such folders and are frequently browsing your C drive (which few people do).

  0 Comments

Sign in to comment.


Answer by David McFarlane on 6 Sep 2019

Actually, I thought of another option ...
(5) No, you don't have to add any folders off the root in order to make specialized third-party toolboxes globally available. Instead of putting a toolbox subfolder in the Documents folder of any target user (as in option #2), put the subfolder in the Documents folder of user "Public", i.e., 'C:\Users\Public\Documents\MATLAB\Toolboxes\'. This puts the toolboxes in an established, universal location that abides by all the rules, outside of protected file space, and makes them globally available.

  0 Comments

Sign in to comment.