Skip to content

Instantly share code, notes, and snippets.

@bjarkevad
Created February 16, 2014 15:53
Show Gist options
  • Save bjarkevad/9036331 to your computer and use it in GitHub Desktop.
Save bjarkevad/9036331 to your computer and use it in GitHub Desktop.
%Datamatrix D:
D = [ -6.5 -6.5 -6.5 -6.5 -2.5 -2.5 -.75 -.75 3.25 3.25 4.5 4.5 6.5 6.5 6.5 6.5; ...
-2 -2 .5 .5 .5 .5 2 2 2 2 .5 .5 .5 .5 -2 -2; ...
-2.5 2.5 2.5 -2.5 -2.5 2.5 -2.5 2.5 -2.5 2.5 -2.5 2.5 -2.5 2.5 2.5 -2.5; ...
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1;...
];
%Adjency matrix
A =[0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1;...
1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0;...
0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0;...
1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0;...
0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0;...
0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0;...
0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0;...
0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0;...
0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0;...
0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0;...
0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0;...
0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0;...
0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1;...
0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0;...
0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1;...
1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0];
%Plot points
for i = 1:16,
hold();
plot3(D(1,i), D(2,i), D(3, i), 'o')
hold();
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment