MATLAB quiver

The quiver function creates a 2D graphic of a vector.


Usage

To render a vector from the origin to the point (2,4), try:

figure;
quiver(0,0, 2,4);

Alternatively, consider a vector field.

[X,Y] = meshgrid(linspace(-3,3,20), linspace(-3,3,20));

fX = Y;
fY = 0.5.*X;

figure;
quiver(X,Y, fX,fY);

See also figures and related commands.


CategoryRicottone

MATLAB/Quiver (last edited 2025-12-17 21:20:29 by DominicRicottone)