Commit 07fa4a21 by Conor McCoid

### Extrap: playing around with Householder version for overdetermined systems

parent ebecf0cc
 ... ... @@ -6,13 +6,19 @@ function [x_out,r_out]=ALGO_extrap_MPE_v3_20211119(F,X) R=F; H=zeros(d,k); %I=eye(d); Q=I; x_out=zeros(d,k); r_out = zeros(k,1); x_out(:,1)=X(:,1);r_out(1)=norm(F(:,1)); for i=1:min(d,k) w = SUB_extrap_Householder_v1_20211119(R(:,i),i); for i=1:k if i<=d w = SUB_extrap_Householder_v1_20211119(R(:,i),i); % Q = Q - 2*Q*(w*w'); R = R - 2*(w*w')*R; R = R - 2*(w*w')*R; end if i>1 H(1:i-1,i-1)=R(1:i-1,i)-R(1:i-1,i-1); H(i,i-1)=R(i,i); u = zeros(i-1,1); u(1)=-R(1,1); u=H(1:i-1,1:i-1)\u; ind=1:min(i-1,d); H(ind,i-1)=R(ind,i)-R(ind,i-1); if i<=d H(i,i-1)=R(i,i); end u = zeros(min(i-1,d),1); u(1)=-R(1,1); u=H(ind,1:i-1)\u; u = [1;u] - [u;0]; x_out(:,i) = X(:,1:i)*u; r_out(i) = norm(F(:,1:i)*u); ... ...
 % Example - Extrapolation: fixed point iteration on linear function % solve the equation x = Ax + b for random A and b d = 40; n=2*d; d = 10; n=2*d; A = rand(d); A = A/norm(A); % A = A/norm(A); b = rand(d,1); x_true = -(A - eye(d)) \ b; X = b; for i=1:n ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!