toolboxdir - Root directory for specified toolbox

Syntax

toolboxdir('tbxdirname')
s = toolboxdir('tbxdirname')
s = toolboxdir tbxdirname

Description

toolboxdir('tbxdirname') returns a string that is the absolute path to the specified toolbox, tbxdirname, where tbxdirname is the directory name for the toolbox.

s = toolboxdir('tbxdirname') returns the absolute path to the specified toolbox to the output argument, s.

s = toolboxdir tbxdirname is the command form of the syntax.

Remarks

toolboxdir is particularly useful for MATLAB Compiler software. The base directory of all toolboxes installed with MATLAB software is:

matlabroot/toolbox/tbxdirname

However, in deployed mode, the base directories of the toolboxes are different. toolboxdir returns the correct root directory, whether running from MATLAB or from an application deployed with the MATLAB Compiler software.

Example

To obtain the path for the Control System Toolbox software, run

s = toolboxdir('control')

MATLAB returns

s = \\myhome\r2008b\matlab\toolbox\control

See Also

ctfroot (in the MATLAB Compiler product), fullfile, matlabroot, partialpath, path,

Managing Files and Working with the Current Directory

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS