function nma_math_228_fall_2010_HW5_plot_condition_numbers
% plot conditions numbers per N
% HW 5, math 228A, UC davis

close all;

noneCond = [150, 603, 2413];
ssorCond = [33, 128, 511 ];
inc1Iters = [32, 108, 422];
inc2Iters = [48, 153, 373];
n = [225,961,3969];

plot(n,noneCond,'-o',n,ssorCond,'-o',...
   n,inc1Iters,'-o',n,inc2Iters,'-o');

legend('CG','CG-SSOR','CG-Incomplete Choleslky, tol=0.01',...
   'CG-Incomplete Choleslky, tol=0.001');
title('Condition numbers of system matrix');
xlabel('number of unknowns (N)');
ylabel('condition numbers');

end
