# Create Special Matrix (G Dataflow)

Generates a matrix of a specific type.

## matrix type

Type of matrix this node generates.

Let n represent the matrix size, x represent the input vector 1, nx represent the size of x, and y represent the input vector 2, ny represent the size of y, and B represent the output special matrix.

Name Value Description
Identity 0

Generates an n-by-n identity matrix.

Diagonal 1 Generates an nx-by-nx diagonal matrix whose diagonal elements are the elements of x.
Toeplitz 2 Generates an nx-by-ny Toeplitz matrix, which has x as its first column and y as its first row. If the first element of x and y are different, the first element of x is used.
Vandermonde 3

Generates an nx-by-nx Vandermonde matrix whose columns are powers of the elements of x. The elements of a Vandermonde matrix are:

${b}_{i,j}={x}_{i}^{nx-j-1}$

where i, j = 0, ..., nx - 1.

Companion 4 Generates an nx-1-by-nx-1 companion matrix. If vector x is a vector of a polynomial coefficient, the first element of x is the coefficient of the highest order, the last element of x is the constant term in the polynomial, the corresponding companion matrix is constructed as follows:
• The first row is:

${b}_{0,j-1}=-\frac{{x}_{j}}{{x}_{o}}$, where j = 1, 2, ..., nx - 1.
• The rest of B from the second row is an identity matrix.
• The eigenvalues of a companion matrix contain the roots of the corresponding polynomial.
Hankel 5 Generates an nx-by-ny Hankel matrix, where x is the first column and y is the last row of the matrix. If the first element of y and last element of x are different, this node uses the last element of x.
Hadamard 6 Generates an n-by-n Hadamard matrix, whose elements are 1 and -1. All columns or rows are orthogonal to each other. The matrix size must be a power of 2, a power of 2 multiplied by 12, or a power of 2 multiplied by 20. If n is 1, this node returns an empty matrix.
Wilkinson 7 Generates an n-by-n Wilkinson matrix whose eigenvalues are ill-conditioned.
Hilbert 8

Generates an n-by-n Hilbert matrix, which has elements according to the following equation:

${b}_{ij}=\frac{1}{i+j+1}$

where i, j = 0, 1, ..., n - 1.

Inverse Hilbert 9 Generates the inverse of an n-by-n Hilbert matrix.
Rosser 10 Generates an 8-by-8 Rosser matrix whose eigenvalues are ill-conditioned.
Pascal 11

Generates an n-by-n symmetric Pascal matrix, which has elements according to the following equation:

${b}_{ij}=\left(\begin{array}{c}i+j\\ i\end{array}\right)$

where i, j = 0, 1, ..., n - 1.

Default: Identity

## vector 1

Matrix used to compose part of a Diagonal, Toeplitz, Vandermonde, Companion, or Hankel matrix.

This input accepts an array of double-precision, floating point numbers or array of complex double-precision, floating point numbers.

## vector 2

Matrix used to compose part of either a Toeplitz or Hankel matrix.

This input accepts an array of double-precision, floating point numbers or array of complex double-precision, floating point numbers.

## matrix size

Number of dimensions of the generated matrix.

## error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: No error

## special matrix

The generated matrix.

This output can return a 2D array of double-precision, floating point numbers or 2D array of complex double-precision, floating point numbers.

## error out

Error information. The node produces this output according to standard error behavior.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported