
%%addpath ../general;
%%addpath ../iters1Dim;
close;

A = fd3d(30,30,1,0,0,0,0);
n = size(A,1);
b = A*ones(n,1);
x = randn(n,1);
nits = 200;
tol = 1.e-06
[x1, r1] = steep(A, b, x, nits,tol);
[x2, r2] = mr(A, b, x, nits,tol);
[x3, r3] = sor(A, b, x,nits,1.8,tol);
[x4, r4] = rnsteep(A, b, x, nits,tol);

semilogy([1:length(r1)], r1, 'linewidth',2)
hold on 
semilogy([1:length(r2)], r2,'r--', 'linewidth',2) 
semilogy([1:length(r3)], r3,'k:', 'linewidth',2) 
semilogy([1:length(r4)], r4,'m-.', 'linewidth',2) 
h=legend('Steep. desc.','min. res.','sor', 'rn-steep. desc');
set(h,'location','SouthEast')
%%
set(h,'fontsize',20)
