Plot With Direction

Plot column vectors with arrows pointing to the next elements.
7.1K Downloads
Updated 7 Nov 2010

View License

function [h1, h2] = plot_dir (vX, vY)

Plotting x-y variables with direction indicating vector to the next element.

Example
vX = linspace(0,2*pi, 10)';
vY = sin (vX);
plot_dir(vX, vY);

Plot and quiver functions used.

Cite As

Kangwon Lee (2026). Plot With Direction (https://uk.mathworks.com/matlabcentral/fileexchange/1676-plot-with-direction), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R10
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Vector Fields in Help Center and MATLAB Answers
Acknowledgements

Inspired: Plot directed, DIRECTEDPLOT

Version Published Release Notes
1.1.0.0

Added comment lines

1.0.0.0