Low-Level File I/O
Read and write operations at the byte or character level
Funktionen
fclose | Close one or all open files |
feof | Test for end of file |
ferror | File I/O error information |
fgetl | Read line from file, removing newline characters |
fgets | Read line from file, keeping newline characters |
fileread | Read contents of file as text |
fopen | Open file, or obtain information about open files |
fprintf | Write data to text file |
fread | Read data from binary file |
frewind | Move file position indicator to beginning of open file |
fscanf | Read data from text file |
fseek | Move to specified position in file |
ftell | Current position |
fwrite | Write data to binary file |
Beispiele und Gewusst wie
- Import Text Data Files with Low-Level I/O
Low-level file I/O functions allow the most control over reading or writing data to a file.
- Import Binary Data with Low-Level I/O
Low-level file I/O functions allow the most direct control over reading or writing data to a file.
- Export to Text Data Files with Low-Level I/O
This example shows how to create text files, including combinations of numeric and character data and nonrectangular files, using the low-level
fprintf
function. - Export Binary Data with Low-Level I/O
Low-level file I/O functions allow the most direct control over reading or writing data to a file.
Konzepte
- Supported File Formats for Import and Export
Table of file formats that MATLAB® can read and write, and recommended functions.