petersen(g) --- overwrite g with the Petersen graph
0001 function petersen(g) 0002 % petersen(g) --- overwrite g with the Petersen graph 0003 0004 resize(g,0); 0005 resize(g,10); 0006 full(g); 0007 0008 elist = [ 0009 1 6 0010 2 7 0011 3 8 0012 4 9 0013 5 10 0014 1 2 0015 2 3 0016 3 4 0017 4 5 0018 5 1 0019 6 8 0020 7 9 0021 8 10 0022 9 6 0023 10 7 0024 ]; 0025 add(g,elist); 0026 0027 t = [0:4]*2*pi/5; 0028 x = sin(t); 0029 y = cos(t); 0030 xy1 = [x', y']; 0031 0032 xy = [2*xy1; xy1]; 0033 embed(g,xy);