Matrix Logarithm (G Dataflow)

Computes the natural logarithm of a square matrix.

matrix

A square matrix.

This input accepts a 2D array of double-precision, floating point numbers or 2D array of complex double-precision, floating point numbers.

logarithm option

Option for the logarithm that this node returns.

Name Value Description
General 0 Regards the input matrix as a complex matrix.
Real 1 Returns an exact real logarithm when the input matrix is a non-singular normal matrix and each of the negative eigenvalues occur an even number of times. When the input matrix is not normal or one of its negative eigenvalues occurs an odd number of times, this node returns the matrix logarithm as if logarithm option was General.

Default: General

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

matrix logarithm

The natural logarithm of the input matrix.

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Algorithm for Calculating the Logarithm of a Matrix

The natural logarithm is the inverse operation of the exponential. The following equation defines the natural logarithm of a matrix A:

${e}^{B}=A$

where

• matrix B is the logarithm of matrix A.

A matrix has a logarithm if and only if its inverse matrix exists. For a real matrix A, its logarithm matrix B can be complex, and the conjugate of matrix B is also the natural logarithm of matrix A.

A real matrix A is normal if AAT = ATA.

For a non-singular normal matrix, if each negative eigenvalues of matrix A occur an even number of times, matrix A has a real logarithm. Note that this does not guarantee the uniqueness of the real logarithm.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application