|
From: | Vic Norton |
Subject: | Re: QR vs LU factorisation |
Date: | Mon, 30 Jun 2008 17:31:33 -0400 |
On Jun 30, 2008, at 5:16 PM, Jaroslav Hajek wrote:
SVD is the best solution in this case. For example, to invert a matrix A choose an svd "precision", say svdcut = 1e-12; Then do [U S V] = svd(A, 1); sig = diag(S); rnk = 0; for i = 1 : length(sig) if sig(i)/sig(1) < svdcut; break; endif rnk++; endfor Ainv = ( V(:, 1:rnk) * diag(1 ./ sig(1:rnk)) ) * U(:, 1:rnk)'; to get the (pseudo)inverse of A.or just use "pinv".
What is the "precision" of "pinv"? If your data only is accurate to 6 digits, why try for anything more accurate than svdcut = 1e-7 would produce? Any additional "accuracy" is pure noise.
Regards, Vic
[Prev in Thread] | Current Thread | [Next in Thread] |