Skip to content

Instantly share code, notes, and snippets.

@VincentTam
Created January 29, 2018 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VincentTam/28f2c2439c58cc034cf86cd90fdeda76 to your computer and use it in GitHub Desktop.
Save VincentTam/28f2c2439c58cc034cf86cd90fdeda76 to your computer and use it in GitHub Desktop.
figure
title('A connected not path connected set')
hold on
% Plot set A
for i = 1:10
plot([0,1], [0,1/i], "linewidth", 2)
end
% Plot set B
plot([0.5,1],[0,0],'--', "linewidth",2)
% dist(A_1,B\A_1)
quiver(1,0.75,0,0.25,0,'linewidth',1.7,'MaxHeadSize',0.1)
quiver(1,0.75,0,-0.25,0,'linewidth',1.7,'MaxHeadSize',0.1)
text(1, 0.75,"angle difference = 0.322")
% dist(A_1 U A_2, B\(A_1 U A_2)
quiver(0.8,0.6,0,0.2,0,'linewidth',1.7,'MaxHeadSize',0.1)
quiver(0.8,0.6,0,4/15-0.6,0,'linewidth',1.7,'MaxHeadSize',0.1)
text(0.4, 0.6,"angle difference = 0.463")
hold off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment