CxSVD

Advanced Analysis Library Only

AnalysisLibErrType CxSVD (void *inputMatrix, int numberOfRows, int numberOfColumns, void *UOrthogonalMatrix, ComplexNum singularValuesVector[], void *VOrthogonalMatrix);

Purpose

Note  This function is obsolete. National Instruments recommends that you use CxSVDEx instead.

Calculates the Singular Value Decomposition (SVD) factorization of the complex input matrix. The input matrix can be square or rectangular.

The following formula defines the SVD factorization of an n-by-m matrix A:

A = USVH

where U is an orthogonal matrix of dimensions n-by-min(n,  m)
V is an orthogonal matrix of dimensions m-by-min(n,  m)
S is a diagonal matrix of dimensions min(n,  m)-by-min(n,  m)
n is the number of rows
m is the number of columns

VH represents the complex conjugate transpose of V. The diagonal elements of S are called the singular values of A and are arranged in descending order. CxSVD stores the diagonal elements of S in the output array.

The Singular Value Decomposition is an eigenvalue-like decomposition for rectangular matrices. You can use it to calculate the condition number of a matrix or to solve linear, least square problems. SVD is useful for ill-conditioned or rank-deficient problems because it can detect small singular values.

Parameters

Input
Name Type Description
inputMatrix numeric array 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;

numberOfRows integer Number of rows in inputMatrix.
numberOfColumns integer Number of columns in inputMatrix.
Output
Name Type Description
UOrthogonalMatrix ComplexNum 2D array The numberOfRows-by-numberOfColumns orthogonal matrix that SVD factorization generates.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

singularValuesVector ComplexNum array Array that contains the singular values of inputMatrix, in descending order.

The following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

VOrthogonalMatrix ComplexNum 2D array The numberOfColumns-by-numberOfColumns orthogonal matrix that SVD factorization generates.

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.