Hi,
I am a newhand to the Octave. I saw from the document that the built-in
function "fread" can read data from file. And I bulit a data file named
decimal.txt . The file contents are 1,2,3,4,5 .
I type the following command under Octave:
octave:11> index=fopen("decimal.txt")
index =
{
id = 3
name = decimal.txt
mode = r
arch = native
status = 1
}
octave:12> [data,count]=fread(index,5,"int")
data =
171051569
171182643
count = 2
octave:13> [data,count]=fread(index,5,"int")
data =
0
0
0
0
0
count = 0
Obviously the result is different from that I imagine.
The first question of mine is why the first time "fread" get such
resulst ? If I have wrongly used the arguments of the function ?
The second question of mine is why the two times result are different ?
I will appreciate for your help and advice !
Thanks !
B/R
Ivan
-------------------------------------------------------------
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
-------------------------------------------------------------