MATLAB Function Reference
  Go to function:
    Search    Help Desk 
ftell    See Also

Get file position indicator

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 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.

See Also

fclose      Close one or more open files

ferror      Query MATLAB about errors in file input or output

fopen       Open a file or obtain information about open files

fprintf     Write formatted data to file

fread       Read binary data from file

fscanf      Read formatted data from file

fseek       Set file position indicator

fwrite      Write binary data from a MATLAB matrix to a file



[ Previous | Help Desk | Next ]