function hp=drawvec(xo,yo,um,vm,varargin) %DRAWVEC draw arrows for vectors % DRAWVEC draws vectors on the current axes, given vector origins % and component magnitudes. No scaling is performed; use % VECPLOT to scale and draw the vectors. This function % is called primarily by VECPLOT and returns the handle % of the vector object drawn. % % Inputs: xo,yo - vector origins; arrow eminates from this point % um,vm - vector magnitudes % % Outputs: hp - the handle to the vector object drawn % % PN/PV pairs accepted by DRAWVEC: % ArrowAngle - angle (in degrees) that the arrow head wings % make with the shaft. default=25 % ArrowFac - Length ratio of arrow head relative to % shaft. default=.25 % % All other pn-pv pairs are passed to LINE % % Call as: hp=drawvec(xo,yo,um,vm,pn1,pv1,...); % fac = 3.14159/180.; % Default PN/PV for DRAWVEC ArrowAngle=25; ArrowFac=.25; % Strip off parameter/value pairs in varargin not related to % "line" object properties. k=1; while k