Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - Русский - 日本語
Scilab Help >> Matlab to Scilab Conversion Tips > Matlab-Scilab equivalents > F > fseek (Matlab function)

fseek (Matlab function)

Set file position indicator

Matlab/Scilab equivalent

Matlab Scilab
fseek

Particular cases

Scilab and Matlab functions differ by the flag which indicate the origin of the position indicator, see examples below.

Note that order of input value is different.

Examples

Matlab Scilab
% File beginning:
fseek(fid,offset,'bof')
fseek(fid,offset,-1)
% Current position:
fseek(fid,offset,'cof')
fseek(fid,offset,0)
% File end:
fseek(fid,offset,'eof')
fseek(fid,offset,1)
// File beginning:
fseek(offset,fid,"set")
// Current position:
fseek(offset,fid,"cur")
// File end:
fseek(offset,fid,"end")
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:54 CEST 2016