toolboxdir
Root folder for specified toolbox
Description
s = toolboxdir(
returns a
character vector containing the absolute path to the root folder for the specified
toolbox. toolboxName
)
It is important to use the toolboxdir
function when writing
code using MATLAB®
Compiler™. A toolbox can have a different path depending on whether it is
running from MATLAB or from an application deployed with the MATLAB
Compiler. toolboxdir
ensures that the correct path is
used.
Examples
Input Arguments
Tips
To determine the toolbox name to use for a given toolbox, run this code, substituting
toolbxfcn
with the name of a function in the product.n = 'toolbxfcn'; pat = '(?<=[\\/]toolbox[\\/])[^\\/]+'; regexp(which(n), pat, 'match', 'once')
For example, to determine the toolbox name for Control System Toolbox, set
n
to the name of a function unique to Control System Toolbox, such asdss
.n = 'dss' pat = '(?<=[\\/]toolbox[\\/])[^\\/]+' regexp(which(n), pat, 'match', 'once')
control
Extended Capabilities
Version History
Introduced in R2006a
See Also
fullfile
| matlabroot
| path