O'Reilly logo

MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] by Manoj Kumar Sharma, Ashok Kumar Goel, Raj Kumar Bansal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.6. Low-Level Input–Output Functions

There are a number of low-level file input–output functions in MATLAB which are based on the input–output functions of ANSI Standard C Library. The functions are generally categorized as

These are listed in Table 5.2.

Table 5.2. Low-Level File 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 functionsfscanfRead formatted data from file
 fprintfWrite formatted data to file
 fgetlReturn next line of file as string without line terminator
 fgetsReturn next line of file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required