MATLAB File Help: cv.solve | Index |
Solves one or more linear systems or least-squares problems.
[dst,ret] = cv.solve(src1, src2)
[...] = cv.solve(..., 'OptionName', optionValue, ...)
src1
can be singularsrc1
must be symmetricalsrc1
must be
symmetrical and positively definedsrc1
can be singularsrc1' * src1 * dst = src1' * src2
are solved instead of the original system src1 * dst = src2
.
defaul falseThe function cv.solve solves a linear system or least-squares problem (the latter is possible with 'SVD' or 'QR' methods, or by specifying the flag 'IsNormal'):
dst = argmin_{X} ||src1*X - src2||
If 'LU' or 'Cholesky' method is used, the function returns 1 if src1
(or src1'*src1
) is non-singular. Otherwise, it returns 0. In the latter
case, dst
is not valid. Other methods find a pseudo-solution in case of a
singular left-hand side part.
If you want to find a unity-norm solution of an under-defined singular
system src1 * dst = 0
, the function cv.solve will not do the work.
Use cv.SVD.SolveZ instead.