Using the C++ Math Library    

Using File I/O Functions 

The MATLAB C++ Math Library supports the following C and C++-style file
I/O functions:

The library's file I/O functions are similar to the ANSI standard C functions of the same name; they do, however, have several significant restrictions and extensions.

For example, the fprintf() function in the MATLAB C++ Math Library has two required input arguments and an unlimited number of optional input arguments. The first argument is the valid ID of an open file. The second is a format string that controls how the output data is formatted. In the library, both these arguments must be arrays.

The MATLAB C++ Math Library's version of fprintf() also processes the format string differently than the standard C++ fprintf(). Rather than requiring a format specifier for each input, it reuses the format string as necessary. The vectorized versions of fprintf() and fscanf() in the library take arrays as arguments, and repeatedly recycle their format strings through the arrays to produce the output or read the input. See the online MATLAB C++ Math Library Reference for complete details on each routine. Accessing Online Reference Documentation describes how to access the Help Desk.


 Using Streams for Interprocess Communication Specifying Library File I/O Functions