You can use the \(\text{LoadBooleanMatrix}\) to load a boolean matrix from a file.

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

The following variants of this function are available:

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

The \(\text{<filename>}\) parameter is the filename of the file to be loaded.

The function returns the newly loaded boolean matrix. The matrix can be stored either in CSV format or in a simple packed binary format. The file type is determined by checking for a file magic number stored at the beginning of the file.

The CSV file can use most common separator characters to separate columns. Supported column separators include tabs, spaces, commas (,), semicolons (;), vertical bars (|), or colons (:). The matrix size is determined based on the maximum number of entries per line and the number of lines.

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 166 shows how you can use the \(\text{LoadBooleanMatrix}\) function.


Figure 166 Example Use Of The LoadBooleanMatrix Function