%-----------------------------------------------------------------------
% script showSparse
%-----------------------------------------------------------------------
   i = 0;
for L = 100:100:1000
     i  = i+1;
   x(i) = L;
   A   = diag(2*ones(L,1)) - diag(ones(L-1,1),-1) - diag(ones(L-1,1),1);
   S_A = sparse(A);
   flops(0); y =   A*rand(L,1); f1(i) = flops;
   flops(0); y = S_A*rand(L,1); f2(i) = flops;
end
   semilogy(x,f1,x,f2)
   legend('Flops with full A','Flops with sparse A',0)
