2D Progressive Vector Diagram
Script originally intended for use in oceanography/fluid dynamics. Use:
>> ipdv(X,Y) % (0,0) default initial position
or
>> ipdv(X,Y,Xo,Yo) % (Xo,Yo) initial position
2D vector components (X,Y) are used to plot the vectors one after another, i.e., next vector starting at the end of the previous one (via Matlab's quiver.m ).
This function handles NANs (Not-A-Number) by putting Zeros in their place, thus allowing the Matlab cumsum.m function to compute the progressive positions (Matlab function cumsum.m doesn't skip Nans). NaNs produce discontinuities in the graphic.
Cite As
Isaac Mancero Mosquera (2024). 2D Progressive Vector Diagram (https://www.mathworks.com/matlabcentral/fileexchange/25940-2d-progressive-vector-diagram), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Vector Fields >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.