## Copyright (C) 2006 G. D. McBain ## ## This program is free software. ## -*- texinfo -*- ## @deftypefn {Function File} {} qquiver (@var{x}, @var{y}, @var{u}, @var{v}, @var{dt}) ## Plot the vector field with components @address@hidden@var{dt}} and ## @address@hidden@var{dt}} at @var{x} and @var{y}. ## @end deftypefn ## Author: G. D. McBain ## Created: 2006-08-10 ## Keywords: plotting, vector fields, direction, arrow, quiver function qquiver (x, y, u, v, dt) n = length (x(:)); x1 = x + u*dt; y1 = y + v*dt; arrowx = reshape ([x(:)'; x1(:)'; (NaN (1, n))], [3*n, 1]); arrowy = reshape ([y(:)'; y1(:)'; (NaN (1, n))], [3*n, 1]); plot (x, y, "*;;g", arrowx, arrowy, "-;;r"); endfunction