% SQGRIDORDER Demo of nested disection order for square grids % (Ed Bueler 2/27/02) N=30; % Try N small (e.g. N=6) and actually look at grid g % to see the ordering produced by nested dissection 'N' % vs. standard ordering 'S' on the square. clf; g=numgrid('S',N); A=delsq(g); subplot(2,2,1), spy(A); title('Standard order: A'); [l,u]=lu(A); subplot(2,2,2), spy(u); title('and U'); g=numgrid('N',N); A=delsq(g); subplot(2,2,3), spy(A); title('Nested dissect: A'); [l,u]=lu(A); subplot(2,2,4), spy(u); title('and U');