登录论坛

查看完整版本 : [求助]新手求教!如何画箭头


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');