function nma_math_228_fall_2010_HW5_plot_cpu
% plot CPU time per N
% HW 5, math 228A, UC davis

noneIters = [0.25, 0.7, 13.4, 559];
ssorIters = [0.23,6.24,209.37,842.3];
mgIters =[0.34, 0.5, 13.48, 566];
inc1Iters = [0.4,6.1,166,567];
inc2Iters = [0.45,6.88,150.5,566];
n = [225, 961, 3969, 16129];

plot(n,noneIters,'-.o',n,ssorIters,'-o',n,mgIters,'-o',n,inc1Iters,'-o',...
   n,inc2Iters,'-o');
legend('NONE','SSOR','Multigrid','Incomplete Choleslky, tol=0.01',...
   'Incomplete Choleslky, tol=0.001');
title('Compare CPU time for different solvers');
xlabel('N, number of unknowns');
ylabel('CPU time');

end