octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38875] strange errors using sqp


From: Julien Bect
Subject: [Octave-bug-tracker] [bug #38875] strange errors using sqp
Date: Mon, 29 Feb 2016 13:13:10 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0

Follow-up Comment #10, bug #38875 (project octave):

For the numerical example of comment #4, it turns out that a decent Cholesky
factorization can be obtained in two steps:


load qp_data.mat

% Find the largest eigenvalue (can be generalized to several)
[V, D] = eigs (H, 1, 'LM');

% Deflate
W = null (V');
H1 = W' * H * W;

% Now we can factorize using chol
R1 = chol (H1);

% Reconstruct a Cholesky factor for H
R = (sqrt (D)) * V * V' + W * R1 * W';

% Reconstruction
Hrec = R' * R;

% Error
err_rel = (H - Hrec) ./ (abs (H));
max (err_rel(:))


(I get a maximal relative error of approx 1.7e-15)


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38875>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]