# $$\text{LoadComplexMatrix}$$¶

You can use the $$\text{LoadComplexMatrix}$$ to load a complex matrix from a file.

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

The following variants of this function are available:

• $$\text{complex matrix } \text{LoadComplexMatrix} \left ( \text{<filename>} \right )$$

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

The function returns the newly loaded complex 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 column values with column values written as pairs of real/imaginary values. 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 167 shows how you can use the $$\text{LoadComplexMatrix}$$ function.

Figure 167 Example Use Of The LoadComplexMatrix Function