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:27:28 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:39.0) Gecko/20100101 Firefox/39.0

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

We could using the trick that I just proposed in recursive manner, as
follows:


function R = robust_chol (H)

n = size (H, 1);  fprintf ('n = %d  -->  ', n);

[R, p] = chol (H);

if p == 0

    fprintf ('OKn');
    
else

    fprintf ('chol failed, deflating...n');

    % 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 = robust_chol (H1);
    
    % Reconstruct a Cholesky factor for H
    R = (sqrt (D)) * V * V' + W * R1 * W';

end

end



    _______________________________________________________

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]