Admin Production ni-theme
Current Publication

Trace

LabWindows/CVI

Trace

Advanced Analysis Library Only

AnalysisLibErrType Trace (void *inputMatrix, ssize_t matrixSize, double *trace);

Purpose

Computes the trace of a real matrix. The trace is the sum of the matrix elements along the main diagonal. Trace obtains the trace using the following formula:

The input matrix must be a matrixSize-by-matrixSize square matrix.

Parameters

Input
Name Type Description
inputMatrix void * The input matrix.
matrixSize ssize_t Size of the input matrix.
Output
Name Type Description
trace double The trace of the input matrix.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later