% script file for sample example clear; close all; G = numgrid('S',12); %G = G(2:end-1,2:end-1); A = delsq(G); figure; subplot(2,4,1); spy(A); title('Sparsity of A'); subplot(2,4,5); L = chol(A); spy(L'); title('Sparsity of L'); p = symrcm(A); A1 = A(p,p); subplot(2,4,2); spy(A1); title('A_1 : reordered via RCM'); L1 = chol(A1); subplot(2,4,6); spy(L1); title('Sparsity of L_1 (RCM)'); p2 = mindeg(A); A2 = A(p2,p2); subplot(2,4,3); spy(A2); title('A_2 : min degree'); L2 = chol(A2); subplot(2,4,7); spy(L2'); title('Sparsity of L_2 (min deg)'); G = nested(12); A3 = delsq(G); subplot(2,4,4); spy(A3); title('A_3 : nested dissection'); subplot(2,4,8); L3 = chol(A3); spy(L3'); title('sparsity of L_3 (nested diss)');