help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: A Gnuplot question


From: Tatsuro MATSUOKA
Subject: Re: Re: A Gnuplot question
Date: Thu, 27 Nov 2008 11:55:25 +0900 (JST)

Hello

Perhaps you mention 
pwd

which means 'Present Working Directory' 

For example
gnuplot> pwd
/cygdrive/d/usr/Tatsu

In octave
octave:1> pwd
ans = /cygdrive/d/usr/Tatsu


Regards

Tatsuro

--- Vic Norton  wrote:
> Unfortunately "help cd" is no help, Thomas.
> Syntax:
>      cd '<directory-name>'
> works if you know the directory-name. I want the Gnuplot script to  
> tell me the name of the directory in which it resides. Then the code  
> will be portable.
> 
> The Octave and Perl segments below do exactly that. The main  
> ingredients have nothing to do with cd or chdir. The main ingredients  
> of the Octave code are fileparts and mfilename. The main ingredient  
> of the Perl code is the FindBin package.
> 
> Regards,
> 
> Vic
> 
> On Nov 26, 2008, at 4:04 PM, Thomas Weber wrote:
> 
> > On Wed, Nov 26, 2008 at 03:04:53PM -0500, Vic Norton wrote:
> >> I realize this is not an Octave question per se, but perhaps someone
> >> here can answer it.
> >>
> >> My question: How do you change directory in Gnuplot so that your
> >> working directory is the directory containing the calling script?
> >>
> >> I know how to do this in Octave:
> >>     basedir = fileparts(mfilename("fullpath"));
> >>     chdir(basedir);
> >> I know how to do it in Perl:
> >>     use FindBin qw($Bin);
> >>     chdir $Bin;
> >> But I don't know how to do it in Gnuplot.
> >
> > help cd
> >
> > which, btw, works in Octave as well
> >
> >     Thomas
> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>

--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]