MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]新手求教!如何画箭头 (https://www.labfans.com/bbs/showthread.php?t=6507)

matlab_fresh 2009-02-24 15:46

[求助]新手求教!如何画箭头
 
新手求教!如何从坐标a到坐标点b的直线上标上箭头?

xiezhh 2009-02-25 23:23

回复: [求助]新手求教!如何画箭头
 
%三维箭头
quiver3(0,0,0,1,0,0,2,'k','filled','LineWidth',2);
hold on
quiver3(0,0,0,0,1,0,2,'k','filled','LineWidth',2);
quiver3(0,0,0,0,0,1,2,'k','filled','LineWidth',2);

%二维箭头
annotation('arrow',[0.1 0.1],[0.8 0.8],'LineStyle','-','color',[1 0 0]);
annotation('arrow',[0.2 0.8],[0.3 0.3],'LineStyle','-','color',[1 0 0],'HeadStyle','plain');
annotation('arrow',[0.2 0.8],[0.5 0.5],'LineStyle','-','color',[1 0 0],'HeadStyle','cback3');
annotation('doublearrow',[0.2 0.8],[0.7 0.7],'LineStyle','-','color',[1 0 0],'HeadStyle','cback3');


所有时间均为北京时间。现在的时间是 11:03

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.