How can I plot diagrams for a particle model?

2 views (last 30 days)
Jeff Lau
Jeff Lau on 1 Mar 2019
Commented: KSSV on 23 Oct 2020
I am working on a particle model that models a swarm (which involves systems of differential equations) and would like to produce diagrams of this form:
pastedImage.png
(source: Yao-li Chuang, Maria R. D’Orsogna, Daniel Marthaler, Andrea L. Bertozzi, and Lincoln S. Chayes, State Transitions and the Continuum Limit for a 2D Interacting, Self-Propelled Particle System)
Is it possible to create diagrams like this?
Right now I have
V = sym('V', [N d]); % velocity (N particles, dimension = 2), V(i,j) is the jth velocity component of the ith particle
X = sym('X',[N d]); % the position defined same way as above
I am aiming to approximate the solution numerically and plot the graphs above.
  1 Comment
KSSV
KSSV on 23 Oct 2020
If you the locations (x,y) and the respective vector components (u,v) you can very much plot the shown figures using quiver.

Sign in to comment.

Answers (0)

Categories

Find more on Data Import and Analysis in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!