|
From: | Paul Thomas |
Subject: | Re: Help me with these Errors |
Date: | Sat, 06 Mar 2004 12:10:04 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 |
Saba,The stream number (ie the value of logfile) of -1 has come about because there is an error in opening the log file. It is very likely because the subdirectory logs does not exist.
Assuming that you are in the directory, in which the sub-directory logs should be found, from the octave prompt type ls ./logs If the directory is not there, it will say so. If it is, it will tell you what files and subdirectories there are. Assuming that it is not, which is what I suspect, at the octave prompt, [ err , msg ] = mkdir ( "logs" ) , which should return err=0 and an msg="" if all is well.
By the way, the likes of fopen are very well documented -help -i invokes the online manual and help -i <topic> sends you directly to the page for that topic; eg help -i fopen
Regards Paul T Saba Karim Shah wrote:
Hi, I would like to know if someone can help me debug this error. I am a beginner with Octave and I have installed Octave 2.1.50 on Windows XP Pro. I have this file which I am trying to run. The file as per the author is trouble free and not to forget the author has made the filed using Octave for Linux. When I run the file the following error is generted. error: fprintf: invalid stream number = -1 error: evaluating if command near line 66, column 1 error: near line 70 of file `/cygdrive/c/utils/temp/octave-simulation/rsvp.m' The lines where the error points to are: # open the log files and write the first line showing the order logfile = fopen ("logs/simulation.log", "a+", "native"); if (mp) fprintf(logfile, "# mp, "); else fprintf(logfile, "# moid, "); endif The value of mp is set to zero in the begining of thecode.Please help. Regards, Saba __________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com ------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |