Please see Sven's answer to a similar question:
I am afraid that LAPACK does not contain a routine to compute the
covariance matrix. You need to use LAPACK routines to put together a
If, for example, you have used DGELS to solve the least squares problem
with one right hand side b and m >= n using the QR factorization, then
you need to compute C given by
C = sigma^2*(R^T R)^(-1),
where sigma is the estimated variance of the residual vector and is
given by the sum of squares of elements (n+1) to m returned in B. Note
that you can use routine DPOTRI to compute (R^T R)^(-1).
Good luck and best wishes,
On Sep 26, 2007, at 2:02 PM, Dat Tran wrote:
Hi I am looking for a Matlab alternative to do complex matrix math.
Does lapack have the equivalent Matlab function "cov"? (covariance)
Thank you for your time.
Lapack mailing list