Member of the support class.
y = fseek(fid, x, from)
Moves the position of the current file mark to the position you specify in x according to the mode you specify in from.
| Name | Description | ||||||
| fid | Specifies the identifier for the file you want to read. Use the fopen function to obtain the file identifier. fid is an integer. | ||||||
| x | Specifies how far in bytes from the location you specify in from to set the file mark. | ||||||
| from | Specifies where to set the file mark together with x. from is a string that accepts the following values.
|
| Name | Description |
| y | Returns the status of this function. If fseek is successful, this function returns 0. Otherwise, this function returns -1. |
This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.
t = 0:0.1:pi;
x = sin(t);
fid = fopen('datafile.dat', 'w+');
c = fprintf(fid, '%f\n', x);
y = fseek(fid, 0, 'bof')
fclose(fid);