Reputation: 57
I have to manually add paths to multiple files in a matlab script, i.e. my matlab directory or startup.m, but i am unsure as to how to find the full file path for either of these on a unix system
I have tried find, which, whereis, but none seem to provide the full file path
ie
whereis matlab
find matlab
Upvotes: 0
Views: 270
Reputation: 60615
matlabroot
returns the directory where MATLAB is installed:
p = matlabroot;
The MATLAB executable is typically in fullfile(matlabroot,'bin','matlab')
.
To find the location of an M-file that is on the MATLAB path, use which
:
p = which('startup')
Upvotes: 1