LabWindows/CVI

Table of Contents
  • LabWindows/CVI Fundamentals
  • Creating Applications
  • Distributing Applications
  • Library Reference
  • Programmer Reference
  • Hardware Information

CxTrace

Advanced Analysis Library Only

AnalysisLibErrType CxTrace (void *inputMatrix, ssize_t matrixSize, int reserved, NIComplexNumber *trace);

Purpose

Calculates the trace of a complex matrix. The trace of a matrix is the sum of all its diagonal elements.

CxTrace uses the following formula to obtain trace:

Parameters

Input
Name Type Description
inputMatrix void * Input complex matrix. This matrix must be an array of ComplexNum. The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

matrixSize ssize_t Size of inputMatrix.
reserved int Reserved parameter.
Output
Name Type Description
trace NIComplexNumber Sum of the diagonal elements of inputMatrix. The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

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 5.0 and later

Log in to get a better experience