Skip to content

lscov

linear-algebra · scripts/linear-algebra/lscov.m

: x = lscov (A, b)
: x = lscov (A, b, V)
: x = lscov (A, b, V, alg)
: [x, stdx, mse, S] = lscov (…)

Least squares solution of A*x = b with known weights or covariance.

V is either a vector of non-negative weights (proportional to inverse variances) or a Hermitian positive definite covariance matrix (up to a scale factor). alg is "chol" (default) or "orth"; both give the same solution. stdx are the standard errors of x, mse the mean squared error (b-A*x)'*inv(V)*(b-A*x)/(m-n) and S the covariance matrix of x. Rank-deficient problems give the minimum-norm solution.