This chapter presents and describes the main functions and procedures for reading and writing files. First, in Sect. 5.1, the most commonly used and basic file formats are presented along with specific functions for handling them. These include the MATLAB® proprietary binary MAT-file format, as well as more conventional formatted and unformatted text files which are commonly referred to as plain text files. Then, in Sect. 5.2, functions for reading and writing some other commonly used file formats such as CSV, Row-Column-Value, XLS and XML are presented and described. Finally, in Sect. 5.3, some useful tools for working with datasets and document collections are presented.
- cplusplus.com (2011) C++: reference: C library: cstdio (stdio.h): fprintf. http://www.cplusplus.com/reference/clibrary/cstdio/fprintf/. Accessed 20 Oct 2011
- Joachims T (2008) SVM-light: support vector machine. Cornell University. http://svmlight.joachims.org/. Accessed 12 Feb 2011
- Korpela J (2009) A tutorial on character code issues. In IT and communication. http://www.cs.tut.fi/~ jkorpela/chars.html. Accessed 20 Oct 2011
- Shafranovich Y (2005) Common format and MIME type for comma-separated-values (CSV) files. The internet society. http://tools.ietf.org/html/rfc4180. Accessed 20 Oct 2011
- The MathWorks (2011) MATLAB file I/O guide. http://www.mathworks.com/support/technotes/1600/1602.html. Accessed 20 Oct 2011
- Wächter A (2010) Triplet format for sparse matrices. In introduction to IPOPT. http://www.coinor.org/Ipopt/documentation/node57.html. Accessed 20 Oct 2011
- W3C (2008) W3C recommendation on extensible markup language (XML) 1.0, 5th edn. http://www.w3.org/TR/xml/. Accessed 11 Jan 2011