MATLAB Function Reference |
Syntax
Description
position = ftell(fid)
returns the location of the file position indicator for the file specified by fid
, an integer file identifier obtained from fopen
. The position
is a nonnegative, zero-based integer specified in bytes from the beginning of the file. A returned value of -1
for position
indicates that the query was unsuccessful; use ferror
to determine the nature of the error.
Remarks
ftell
is likely to return an invalid position
when all of the following are true. This is due to the way in which the Microsoft Windows C library currently handles its ftell
and fgetpos
commands:
dlmwrite
and csvwrite
.)
fopen
function with mode
set to 'rt'
.
ftell
command is directly preceded by an fgets
command.
Note that this does not affect the ability to accurately read from and write to this type of file from MATLAB.
See Also
fclose
, ferror
, fopen
, fprintf
, fread
, fscanf
, fseek
, fwrite
fseek | ftp |
© 1994-2005 The MathWorks, Inc.