Table Of Contents

Trace (G Dataflow)

Last Modified: January 9, 2017

Finds the trace of a matrix.



A square or rectangular matrix.

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


error in

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

Default: No error



The sum of the elements in the main diagonal of the input matrix.


error out

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

Algorithm for Calculating the Trace of a Matrix

This node uses the following equation to compute the output trace.

tr ( A ) = i = 0 min ( m , n ) 1 a i i


  • A is the input matrix
  • tr(A) is the output trace
  • m and n are the number of rows and the number of columns of the input matrix, respectively

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Recently Viewed Topics