Low-Level Input-Output Functions

Type of FunctionFunction NameDescription
File opening and closing functionsfopenOpen a file for read or write operations
 fcloseClose one or more opened files
Formatted input–output functionsfscanf

fprintf

fgetl
Read formatted data from file

Write formatted data to file

Return next line of file as string without line terminator
 fgetsReturn next line of file as string with line terminator
Binary input–output functionsfwrite freadWrite data in binary form. Read binary data from file

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.