About Functions for Reading and Writing Files
The following functions are useful for reading various file types into PTC Mathcad arrays. Descriptions are grouped by file type.
Data Files
• READFILE, WRITEFILE—Reads or writes an array of values from/to delimited, fixed width, or Excel data files.
• READCSV, WRITECSV—Reads or writes an array of values from/to comma separated variable
(CSV) data files.
Image Files
Image Properties
Sound Files
• READWAV, WRITEWAV—Reads and writes arrays containing signal amplitudes in
WAV files.
• GETWAVINFO—Creates a vector containing information about a
WAV file.
Additional Information
• When you define a file name as an argument to one of the file access functions, you must include the file type. For example, a valid filename is “monalisa.bmp”.
• Pathnames are relative to the current working directory. To verify the current working directory, type the command CWD=.
• In all write functions, both rows and cols arguments are indices that start with 1. ORIGIN does not affect the behavior of read functions.