| MF_solveBySVD
| MD_solveBySVD |
ME_solveBySVD |
|
| Function | solve a possibly over- or underdetermined linear system by singular value decomposition |
|
| Syntax C/C++ | #include <MFstd.h>
int MF_solveBySVD( fVector X, fMatrix MA, fVector B, unsigned htA, unsigned lenA ); |
| C++ MatObj | #include <OptiVec.h>
void vector<T>::solveBySVD( const matrix<T>& MA, const vector<T>& B ); |
| Pascal/Delphi | uses MFstd;
function MF_solveBySVD( X:fVector; MA:fMatrix; B:fVector; htA, lenA:UInt ): IntBool; |
|
| Description | The system MA * X = B of simultaneous linear equations is solved for X, using Singular Value Decomposition. Here, underdetermined systems do not lead to an error. Rather, you get one particular solution out of the solution space. If you have more equations than unknowns, i.e., in the case of an overdetermined system, the solution vector contains a least-square "compromise" between the equations.
The function should always return FALSE (0). Only in the very rare case of SVD failure, TRUE (1) is returned. The length of the desired solution vector, sizX must be equal to the width of the input matrix, lenA, whereas the length of the right-hand-side vector, sizB must be equal to htA.
The threshold for singular-value editing should be set using MF_SVDsetEdit. |
|
| Return value | usually FALSE (0); only in the very rare case of failure, TRUE (1) |
|
|