help-octave
[Top][All Lists]
Advanced

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

Re: fid=-1


From: James Sherman Jr.
Subject: Re: fid=-1
Date: Thu, 26 May 2011 14:51:42 -0400



On Thu, May 26, 2011 at 3:51 AM, Federica <address@hidden> wrote:
Hi,

I'm new to this forum and above all I'm new to Octave....in this forum I
found some useful information on how Octave works but I'm having a lot of
problems in trying to create a script with Octave 3.2.4 on Windows and so I
decided to ask for your help. I'd like to solve a system of differential
equations whose coefficients must be taken from a txt or csv file. Each row
of the file gives the 8 coefficients needed by the the two equations. So I
was thinking that dlmread could be useful but a first problem appears. The
file cannot be opened and I don't understand why. I tried with

filename= "prova.txt"
fid=fopen(filename, "r")

but the fid=-1 so it cannot opened but why? the txt file contains numbers
with 3 decimal numbers

Hi Frederica,

My first guess (and I've done this many times) is that you're not in the correct directory.  Try comparing the output of "pwd" with the directory where your txt file is located.  If they are different, either use "cd" to change your current working directory or include the entire path in your filename.

Hope this helps,

reply via email to

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