This c file implements the functions to do the singular value decomposition of matrices.
Creation date: 2008
- Author
- Robotran team
Original file by JF Collard, 2008
(c) Universite catholique de Louvain
void svdcmp |
( |
double ** |
a, |
|
|
int |
m, |
|
|
int |
n, |
|
|
double |
w[], |
|
|
double ** |
v |
|
) |
| |
computes the Singular Value Decomposition a = u.w.v'
The output matrix u is stored in the input matrix a.
The given arrays size is the minimum size, bigger arrays are acceptable. Indeed, the function will only use the first N elements of a 1D array or the first N rows and M columns of 2D arrays. Giving an oversized array as input (for example one of mbs_aux->... that is initialized at the system maximum possible size) is not an issue.
- Parameters
-
[in,out] | a | the input matrix, with index starting at 1, to be decomposed. The content is modified to be the output matrix u. Its size must at least be m x n (0 element not taken into account). |
[in] | m | the number of rows (0 element not taken into account) of the matrix a. |
[in] | n | the number of columns (0 element not taken into account) of the matrix a. |
[out] | w | the vector, with index starting at 1, to store the singular values. |
[out] | v | the matrix v (not the transpose) of size n x n (0 element not taken into account). |