Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Low-Level File I/O

Read and write operations at the byte or character level

Functions

fclose Close one or all open files
feof Test for end-of-file
ferror Information about file I/O errors
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 Position in open file
fwrite Write data to binary file

Examples and How To

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

Encoding schemes support the characters required for particular alphabets, such as those for Japanese or European languages.

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.

Concepts

Methods for Importing Data

MATLAB® import options for various data formats

Was this topic helpful?