28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

fopen<br />

2-868<br />

'ieee-be.l64' or 's' IEEE floating point with big-endian byte<br />

ordering and 64-bit long data type<br />

'ieee-le.l64' or 'a' IEEE floating point with little-endian byte<br />

ordering and 64-bit long data type<br />

'native' or 'n' Numeric format of the machine on which<br />

MATLAB is running (the default)<br />

'vaxd' or 'd' VAX D floating point and VAX ordering<br />

'vaxg' or 'g' VAX G floating point and VAX ordering<br />

fids = fopen('all') returns a row vector containing the file identifiers of all<br />

open files, not including 1 and 2 (standard output and standard error). The<br />

number of elements in the vector is equal to the number of open files.<br />

[filename, mode, machineformat] = fopen(fid) returns the filename,<br />

mode string, and machineformat string associated with the specified file. An<br />

invalid fid returns empty strings for all output arguments.<br />

The 'W' and 'A' modes are designed for use with tape drives and do not<br />

automatically perform a flush of the current output buffer after output<br />

operations. For example, open a 1/4" cartridge tape on a SPARCstation for<br />

writing with no autoflush:<br />

fid = fopen('/dev/rst0','W')<br />

Examples The example uses fopen to open a file and then passes the fid returned by<br />

fopen to other file I/O functions to read data from the file and then close the<br />

file.<br />

fid=fopen('fgetl.m');<br />

while 1<br />

tline = fgetl(fid);<br />

if ~ischar(tline), break, end<br />

disp(tline)<br />

end<br />

fclose(fid);<br />

See Also fclose, ferror, fprintf, fread, fscanf, fseek, ftell, fwrite

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!