Plot 2-D vector field with arrow3

5 Ansichten (letzte 30 Tage)
Shan  Chu
Shan Chu am 9 Feb. 2017
Kommentiert: Star Strider am 9 Feb. 2017
Hi, I would like to use the arrow3 function (https://uk.mathworks.com/matlabcentral/fileexchange/14056-arrow3-version-5) to plot a 2-D vector field P (P_x,P_y) with the direction and colour of the arrows representing the direction and magnitude of the field vector P.
I have read the arrow3 file. As far as I understood, the arrow3 will draw an arrow from point 1 to point 2 but I don't know how to represent the magnitude by the colour of the arrows. Could you please help? Thanks
[x,y] = meshgrid(linspace(-10,10,100),linspace(-20,20,200));
P_x=rand(200,100);
P_x=rand(200,100);
  1 Kommentar
Star Strider
Star Strider am 9 Feb. 2017
It is always best to contact the author of a File Exchange contribution if you have questions about it.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Graphics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by