[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sun, 18 Feb 2007 15:07:34 +0100
Thunderbird 188.8.131.52 (X11/20070103)
Okay, I don't think this is quite what you're asking for, but it might
be helpful anyway (untested code, so beware)
function d = here(function_name)
d = fileparts(which(function_name));
After defining this function you should be able to do something like this:
which will take you to the directory where the "image" function exists.
Vic Norton skrev:
Can anyone tell me how to change the working directory to where you are?
For example it would be nice to have a "here" function that would return the
path of the directory in which a script resides. Then
thisdir = here();
would do just what I want.
I do this kind of thing all the time in Perl with the two lines
use FindBin qw($Bin);
I'd like to be able to do it in Octave.
Thanks for any suggestions you might have. - Vic
Help-octave mailing list
- here?, Vic Norton, 2007/02/18
- Re: here?, David Bateman, 2007/02/18
- Re: here?,
Søren Hauberg <=
- Re: here?, Thomas Treichl, 2007/02/18
- Re: here?, Vic Norton, 2007/02/18