x = kron(ones(1,6),[0:7]);
y = kron([0:5],ones(1,8));
XY = [x',y'];
plot(x,y,'o','linewidth',2);
tri = delaunay(XY);
A = assmbl1(tri,XY);
gplot(A,XY)
plot(x,y,'o','linewidth',2);
hold on
gplot(A,XY)
n = 100;
A = sprandn(n,n,10/n);
ACSR = coo2csr(A);
x = randn(n,1);
y1 = csr_matvec(ACSR,x);
y = A*x;
norm(y-y1)
ans =
     0
ACSC = coo2csr(A');
y2 = csc_matvec(ACSC,x);
norm(y-y2)
ans =
     0
IJ = load('Ex4_15.dat')
IJ =
     2     1
     3     1
     4     2
     6     2
     7     3
     5     4
     6     4
n = 7;
nz= length(IJ)
nz =
     7
A = sparse(IJ(:,1),IJ(:,2),ones(nz,1),n,n);
[Lst, Mark]  = dfs(1,A,[],zeros(7,1))
Lst =
     1     3     7     2     4     6     5
Mark =
     1
     1
     1
     1
     1
     1
     1
G = graph(A,'lower');
close
plot(G)
