Admin Production ni-theme
Current Publication

CxSVD

LabWindows/CVI

CxSVD

Advanced Analysis Library Only

AnalysisLibErrType CxSVD (void *inputMatrix, ssize_t numberOfRows, ssize_t numberOfColumns, void *uOrthogonalMatrix, NIComplexNumber singularValuesVector[], void *vOrthogonalMatrix);

Purpose

Note Note  The function has been superseded by CxSVDEx.

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 uOrthogonalMatrix is an orthogonal matrix of dimensions n-by-min(n,  m)
vOrthogonalMatrix is an orthogonal matrix of dimensions m-by-min(n,  m)
singularValuesVector is a diagonal matrix of dimensions min(n,  m)-by-min(n,  m)
numberOfRows is the number of rows
numberOfColumns 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 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;

numberOfRows ssize_t The number of rows in inputMatrix.
numberOfColumns ssize_t The number of columns in inputMatrix.
Output
Name Type Description
uOrthogonalMatrix void * 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 NIComplexNumber [] Array that contains the singular values of inputMatrix, in descending order. SThe following C typedef statement defines the ComplexNum structure:

typedef struct {

double real;

double imaginary;

} ComplexNum;

vOrthogonalMatrix void * 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.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later