find the absolute path of a package
Mostra commenti meno recenti
Hi!
is there an obvious way to find out the absolute path of a package? I mean, if I define a package directory some where in my file system, say,
mkdir <mypath>/+myPackage
and the add its location to the path
addpath <mypath>
then myPackage is active and I can invoke functions from there. But how can I ask the system where this package resides? I mean
which myPackage
does not work. I could make a which to a function inside the myPackage, yes, but I have hundreds of packages, and packages inside packages, and they don't contain the same functions.
any idea? Daniel
Risposta accettata
Più risposte (1)
Image Analyst
il 3 Dic 2014
If you know the name of one of the m-files in the package, then you can do this:
% Determine folder where someFunction.m lives.
folder = fileparts(which('someFunction.m'));
1 Commento
Daniel
il 3 Dic 2014
Categorie
Scopri di più su Search Path in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!