in matlab inverse of matlab can be written:
For least squares ( more efficient)
x = A\b.--------------------------------1
But for covariance matrix (Qxx) of unknown paramters(x), I usually do,
Qxx==inv(A) --------------------------2
How I can write it in efficient way like (1)?
You mean something like:
Qxx = A \ eye(size(A));
?
Real question is, what are you doing with the inverse? If you're just remultiplying it by some other vector c
then you can just do...
A \ c
instead of Qxx * c