LabWindows/CVI

Content Type
Programming Language
Current manual
Table of Contents

CxSVDEx

CxSVDEx

Advanced Analysis Library Only

AnalysisLibErrType CxSVDEx (void *inputMatrix, ssize_t numberOfRows, ssize_t numberOfColumns, int sizeOption, void *uMatrix, double singularValuesVector[], void *vMatrix);

Purpose

Calculates the Singular Value Decomposition (SVD) factorization for a complex matrix, as follows: A = USVH. U is a column orthogonal matrix. That is, UHU = I, where I is the identity matrix, and UH is the conjugate transpose of U. S is a diagonal matrix whose diagonal elements are the singular values of A. V is also a column orthogonal matrix. That is, VHV = I, where VH is the conjugate transpose of V.

National Instruments recommends you use CxSVDEx for SVD operation instead of CxSVD or CxSVDS. CxSVDEx can do full-size decomposition.

Parameters

Input
Name Type Description
inputMatrix void * The matrix to be decomposed.
numberOfRows ssize_t The number of rows in inputMatrix.
numberOfColumns ssize_t The number of columns in inputMatrix.
sizeOption int The size option of SVD. sizeOption must one of the following values:
  • FULL_SIZE (0): The size of uMatrix is numberOfRows * numberOfRows. The size of vMatrix is numberOfColumns * numberOfColumns.
  • ECONOMY_SIZE (1): The size of uMatrix is numberOfRows * min(numberOfRows, numberOfColumns). The size of vMatrix is numberOfColumns * min(numberOfRows, numberOfColumns).

The size option you select depends on the subsequent operations of SVD. Use FULL_SIZE in the following circumstances, where m and n denote the number of rows and columns of the input matrix respectively.
  • m! = n and the subsequent operations require that both U and V be square.
  • m > n and the subsequent operations require that U be square. (V is square with either option in this case.)
  • m < n and the subsequent operations require that V be square. (U is square with either option in this case.)
Otherwise, use ECONOMY_SIZE because it requires less memory.
Output
Name Type Description
uMatrix void * The orthogonal matrix U. If uMatrix = NULL, only singular values are computed.
singularValuesVector double [] The singular values, whose size is min(numberOfRows, numberOfColumns), in descending order. If you want only singular values, call CxSVDEx with either uMatrix = NULL or vMatrix = NULL. In this case, uMatrix and vMatrix are not referenced.
vMatrix void * The orthogonal matrix V. If vMatrix = NULL, only singular values are computed.

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

Was this information helpful?

Previous

CxLU

Next

CxQREx

Previous

CxLU

Next

CxQREx