Development Environment |
Using Low-Level File I/O Functions
MATLAB includes a set of low-level file I/O functions that are based on the I/O functions of the ANSI Standard C Library. If you know C, therefore, you are probably familiar with these routines.
For example, the MATLAB file I/O functions use the same programming model as the C language routines. To read or write data, you perform these steps:
fopen
. fopen
returns a file identifier that you use with all the other low-level file I/O routines.
fread
.
fwrite
.
fgets
/fgetl
.
fscanf
.
fprintf
.
fclose
.
This section also describes how these functions affect the current position in the file where read or write operations happen and how you can change the position in the file.
Getting More Information About HDF | Opening Files |