[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding an m-file
From: |
Stefan van der Walt |
Subject: |
Re: Finding an m-file |
Date: |
Mon, 6 Feb 2006 19:15:10 +0200 |
User-agent: |
Mutt/1.5.9i |
On Mon, Feb 06, 2006 at 05:56:27PM +0100, Simon Webster wrote:
> I want to find the directory an m-file lives in (that is on the
> current path somewhere).
>
> I know exist('myfile.m') should return 2 if myfile.m is on the current
> path, but can I easily get the directory in which the particular
> myfile.m that octave will execute lives?
fileparts(file_in_loadpath('myfile.m'))
Regards
Stéfan
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Finding an m-file, Simon Webster, 2006/02/06
- Re: Finding an m-file,
Stefan van der Walt <=