help-octave
[Top][All Lists]
Advanced

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

reading data stored in a txt file


From: Nibalart
Subject: reading data stored in a txt file
Date: Fri, 09 Jul 2010 07:26:52 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5

Hi to all of you over there,
I have a a file named crashed.txt and in it are stored 1000 lines like this one
350 275 356 293 315
each line has 5 numbers.
I have to read all this data a put them in a matrix   1000*5
I have tried these lines just to read one line

filename = "crashed.txt"
fid = fopen (filename, "r")
[v1, v2, v3, v4, v5] = fscanf(filemane)
disp(v1);disp(v2) and so on

but I receive -1 just as I open the file and no numbers are displayed on the monitor. As you have understood I'm new to this kind of software, please help me . From the hel manual I haven't found examples to highlight the procedure.
Thanks in advance for your help.
By the way, after reading the file, I have to do some operations on the numbers.
Arturo


reply via email to

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