help-octave
[Top][All Lists]
Advanced

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

Re: problem opening file


From: Paul Kienzle
Subject: Re: problem opening file
Date: Wed, 6 Mar 2002 08:58:02 -0500

try:

        fopen(deblank(myfile),"r");

Paul Kienzle
address@hidden

On Wed, Mar 06, 2002 at 12:10:35PM +0100, Davide Cavallari wrote:
> This is a script I wrote:
> 
> ####################################
> #!/usr/bin/octave -qf
> 
> if ( nargin != 2 )
>   usage("plot_som codebook_file output_file\n");
> endif  
> 
> myfile = argv(1,:);
> outfile = argv(2,:);
> 
> #  Apro il file passato come argomento in sola lettura
> #
> [fid, msg] = fopen(myfile, "r");
> 
> ...
> ###################################
> 
> Why if I run it with this 2 command line arguments:
> 
> $ ./plot_som snap-00.cod snap-00.tex
> 
> all works correctly, but if i instead call it with:
> 
> $ ./plot_som snap-00.cod snap-00.cod.tex
> 
> it can't open myfile=snap-00.cod?
> 
> the msg variable says that it is a non-existent file or directory!!
> -- 
> Cheers,
>     Davide Cavallari                
> Perhaps the biggest disappointments were the ones you expected anyway.
> 
> 
> 
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
> 



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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