2016-05-11 245 views

回答

1
p1 = [2 3];       % First Point 
p2 = [9 3];       % Second Point 
dp = p2-p1;       % Difference 
figure(1) 
quiver(p1(1),p1(2),dp(1),dp(2),0) 
grid 
axis([0 10 0 10]) 
text(p1(1),p1(2), sprintf('(%.0f,%.0f)',p1)) 
text(p2(1),p2(2), sprintf('(%.0f,%.0f)',p2)) 

你甚至可以刪除網格突擊隊和文字突擊隊讓你的身材在白色背景:

p1 = [2 3];       % First Point 
p2 = [9 3];       % Second Point 
dp = p2-p1;       % Difference 
figure(1) 
quiver(p1(1),p1(2),dp(1),dp(2)) 
axis([0 10 0 10])