⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arrow2.m

📁 realize analysis and design for computer-controlled system
💻 M
字号:
function arrow2(point,theta,scale)%  ARROW2(point,theta,scale)  draw an arrow pointing in the%  direction theta%  Scale is an optional argument that will scale the size of the arrows%  It is assumed that the axis limits are already set%       8/4/93    Jeffery Faneuff Modified 97-08-04 BW%       Copyright (c) 1988-93 by the MathWorks, Inc.if nargin==2  xl = get(gca,'xlim');  yl = get(gca,'ylim');  xd = xl(2)-xl(1);        % this sets the scale for the arrow size  yd = yl(2)-yl(1);        % thus enabling the arrow to appear in correct   scale = (xd + yd) / 2;   % proportion to the current axisendhold onaxis(axis)xx = [point(1)-0.02*scale*cos(theta+pi/8),point(1),... point(1)-0.02*scale*cos(theta-pi/8)]';yy = [point(2)-0.02*scale*sin(theta+pi/8),point(2),... point(2)-0.02*scale*sin(theta-pi/8)]';plot(xx,yy,'k-','linew',0.9)hold off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -