status = fseek(fid,offset,'origin')
status = fseek(fid, offset, 'origin') repositions the file position indicator in the specified file to the specified byte offset for the specified origin. fid is a integer file identifier obtained from fopen.
offset values are interpreted as follows:
-------------------------------------------------------------------offset>0Move position indicatoroffsetbytes toward the end of the file.offset=0Do not change position.offset<0Move position indicatoroffsetbytes toward the be ginning of the file. -------------------------------------------------------------------
origin can be
-------------------------------------A'bof'-1Beginning of file.'cof'0Current position in file.'eof'1End of file. -------------------------------------
status value for the operation is returned with value 0 on success and -1 on failure. If an error occurs, use the function ferror to get more information about the nature of the error.
fclose,ferror,fopen,fprint,fread,fscanf,ftell,fwrite,sprintf,sscanf
(c) Copyright 1994 by The MathWorks, Inc.