\(\text{SaveIntegerMatrix}\)

You can use the \(\text{SaveIntegerMatrix}\) to save an integer matrix to a file.

You can use the \saveintegermatrix backslash command to insert this function.

The following variants of this function are available:

  • \(\text{boolean } \text{SaveIntegerMatrix} \left ( \text{<matrix>}, \text{<filename>} \right )\)

  • \(\text{boolean } \text{SaveIntegerMatrix} \left ( \text{<matrix>}, \text{<filename>}, \text{<binary>} \right )\)

The \(\text{<matrix>}\) is the integer matrix to be saved and \(\text{<filename>}\) is the filename of the file to save the integer matrix to. The file will be overwritten if it exists.

The \(\text{<binary>}\) flag indicates if the file should be saved in a binary format or in CSV format. If excluded or false, the integer matrix will be saved as a tab separated CSV file suitable for import into software packages such as Microsoft Excel. If true, the integer matrix will be saved in a packed binary format.

Both formats can be read by Aion using the function \(\text{LoadIntegerMatrix}\).

Note that the binary format is designed to be relatively simple for external applications to implement. For details on the binary format, see File Formats.

The Figure 172 shows how you can use the \(\text{SaveIntegerMatrix}\) function.