% The plot code for Homework 6 Project 2; M.O.

[A,b] = matrix (10,0.5);
sol = ones(10,1);

[res1, it1, x1] = gradientmeth(A,b,sol);
[res2, it2, x2] = conjgradmeth(A,b,sol);

semilogy (1:it1, res1, ';Gradient Method;', ...
	  1:it2, res2, ';Conjugate Gradient Method;');

