Commit 18606ca8 authored by Conor McCoid's avatar Conor McCoid
Browse files

Extrap: reduced size of A to have norm 1

parent 4fc64130
% Example - Extrapolation: fixed point iteration on linear function
% solve the equation x = Ax + b for random A and b
d = 10; n=2*d;
A = rand(d); b = rand(d,1); x_true = -(A - eye(d)) \ b;
d = 40; n=2*d;
A = rand(d); A = A/norm(A); b = rand(d,1); x_true = -(A - eye(d)) \ b;
X = b;
for i=1:n
X(:,i+1) = A*X(:,i) + b;
......@@ -32,7 +32,7 @@ semilogy(1:n,Error_v1,'b*--',1:n,Error_v2,'k.--')
xlabel('Iteration')
ylabel('Error in solution')
title('Error vs iteration')
legend('MPE w/ Arnoldi','MPE','GMRES')
legend('MPE w/ Arnoldi','MPE')
figure(2)
semilogy(1:n,res_MPE_v1,'b*--',1:n,res_MPE_v2,'k.--',1:length(res_GMRES),res_GMRES,'ro')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment