GNU Octave, version 2.0.17 (i586-pc-linux-gnu). Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 John W. Eaton. This is free software with ABSOLUTELY NO WARRANTY. For details, type `warranty'. octave> [myfile, msg] = fopen("weight.dat", "r") myfile = 3 msg = octave> myfile myfile = 3 octave> stderr stderr = 2 octave> line = fgetl(myfile) line = 65 130 octave> line = fgetl(myfile) line = 68 170 octave> fclose(myfile) error: `mmyfile' undefined near line 9 column 8 error: evaluating expression near line 9, column 8 error: evaluating argument list element number 1 error: evaluating index expression near line 9, column 1 octave> fclose(myfile) ans = 0 octave> [myfile, msg] = fopen("weight.dat", "r") myfile = 3 msg = octave> [myfile2, msg] = fopen("weight.dat", "r") myfile2 = 4 msg = octave> [myfile3, msg] = fopen("weight.dat", "w") myfile3 = 5 msg = octave> fclose(5) ans = 0 octave> fclose(4) ans = 0 octave> [val, count=fscanf(myfile, "%f %f") > octave> [val, count]=fscanf(myfile, "%f %f\n") val = [](0x1) count = 0 octave> valu error: `valu' undefined near line 16 column 1 error: evaluating expression near line 16, column 1 octave> val val = [](0x1) octave> [val, count]=fscanf(myfile, "%d %d\n") val = [](0x1) count = 0 octave> [val, count]=fscanf(myfile, "%d %d\n") val = [](0x1) count = 0 octave> fclose(myfile) ans = 0 octave> [myfile, msg] = fopen("weight.dat", "r") myfile = 3 msg = octave> [val, count]=fscanf(myfile, "%d %d\n") val = [](0x0) count = 2 octave> fclose(myfile) ans = 0 octave> [myfile, msg] = fopen("weight.dat", "r") myfile = 3 msg = octave> [val, count]=fscanf(myfile, "%d %d\n") val = [](0x0) count = 2 octave> [val, count]=fscanf(myfile, "%d %d") val = 68 170 67 170 74 170 71 160 72 160 count = 10 octave> val val = 68 170 67 170 74 170 71 160 72 160 octave>