Matlab diary from CS 290H, Monday, March 31, 2014 This is /Users/gilbert/Documents/CS290hSpring2014/Matlab/startup.m Starting diary file diary-31-Mar-2014.txt > what M-files in the current directory /Users/gilbert/Documents/CS290hSpring2014/Matlab gplot3 lap startup MAT-files in the current directory /Users/gilbert/Documents/CS290hSpring2014/Matlab dodec yaleShieldBig > load meshes > whos Name Size Bytes Class Attributes Eppstein 547x547 63248 double sparse Exy 547x2 8752 double Smallmesh 136x136 14600 double sparse Sxy 136x2 2176 double Tapir 1024x1024 115656 double sparse Txy 1024x2 16384 double ans 1x48 96 char > cd graphs > what M-files in the current directory /Users/gilbert/Documents/CS290hSpring2014/Matlab/graphs bfslevels clustereg gploth misseq rmat btermatch dhist matstats plotccd rmatstats ccoeff eigsvdgui misluby plotdegs MAT-files in the current directory /Users/gilbert/Documents/CS290hSpring2014/Matlab/graphs G3_circuit clusters samplegraphs PGPgiantcompo coAuthorsDBLP bcsstk08 graphs circuit_3 meshes > load samplegraphs > whos Name Size Bytes Class Attributes Airfoil 4253x4253 563376 double sparse Airfoil2 4720x4720 552392 double sparse Airfoil2info 1x51 102 char Axy 4253x2 68048 double Axy2 4720x2 75520 double BCSSTK08 1074x1074 215976 double sparse BCSSTK08info 1x1 216670 struct Eppstein 547x547 63248 double sparse Exy 547x2 8752 double Grid 225x225 18848 double sparse Gxy 225x2 3600 double Smallmesh 136x136 14600 double sparse Sxy 136x2 2176 double Tapir 1024x1024 115656 double sparse Txy 1024x2 16384 double ans 1x48 96 char > gplotg(Airfoil,Axy) > L = laplacian(Airfoil); > size(L) ans = 4253 4253 > spy(L) > shg > L L = (1,1) 3 (2,1) -1 (18,1) -1 ... (4251,4253) -1 (4253,4253) 4 > [v,lambda] = eigs(L,3,'sm'); > size(v) ans = 4253 3 > lambda lambda = 0.0044 0 0 0 0.0018 0 0 0 0.0000 > v(1:20,:) ans = -0.0071 -0.0154 0.0153 -0.0058 -0.0163 0.0153 -0.0038 -0.0172 0.0153 0.0170 -0.0148 0.0153 0.0017 -0.0182 0.0153 -0.0105 -0.0117 0.0153 0.0229 -0.0113 0.0153 0.0088 -0.0175 0.0153 0.0250 -0.0095 0.0153 -0.0010 -0.0179 0.0153 0.0130 -0.0164 0.0153 0.0243 -0.0102 0.0153 0.0206 -0.0129 0.0153 0.0046 -0.0182 0.0153 -0.0052 -0.0168 0.0153 -0.0033 -0.0176 0.0153 0.0014 -0.0184 0.0153 -0.0085 -0.0143 0.0153 -0.0107 -0.0112 0.0153 0.0104 -0.0174 0.0153 > gplotg(L,v(:,1:2)); shg > specpart(Airfoil,Axy); shg > clear > load clusters > whos Name Size Bytes Class Attributes A 50x50 9400 double sparse S 4x4 72 double sparse ans 100x1 800 double ignore 50x1 400 double lambda 2x1 16 double p 1x50 400 double pp 50x1 400 double uv 50x2 800 double xy 50x2 800 double > spy(A) > gploth(A,xy,1:50) > [uv,d] = eigs(laplacian(A),3,'sm'); ??? Error using eigs (A-sigma*I)is singular. The shift is an eigenvalue. Try to use some other shift please. > uv = fiedler(A,2); > size(uv) ans = 50 2 > uv(1:10,:) ans = -0.1861 0.0589 0.0537 -0.1840 0.1924 0.2106 -0.1894 0.0508 0.0770 -0.1781 -0.1738 0.0510 -0.1589 0.0615 0.1871 0.1957 0.0743 -0.2120 -0.1570 0.0180 > gploth(A,uv,1:50) > clear > load dodec > whos Name Size Bytes Class Attributes A 20x20 708 logical sparse > spy(A) > A = laplacian(A); > uv = fiedler(A,2); > gploth(A,uv,1:20) > clear > load PGPgiantcompo > whos Name Size Bytes Class Attributes Problem 1x1 1037746 struct > Problem Problem = name: 'Arenas/PGPgiantcompo' title: 'largest connected component in graph of PGP users' A: [10680x10680 double] id: 2405 date: '2004' author: [1x58 char] ed: 'A. Arenas' kind: 'undirected multigraph' notes: [8x65 char] aux: [1x1 struct] > L = laplacian(Problem.A); > size(L) ans = 10680 10680 > spy(L) > uv = fiedler(L,2); > gploth(L,uv,1:length(L)) > diary off