How can make arrows into the line step by step?

3 vues (au cours des 30 derniers jours)
Myo Gyi
Myo Gyi le 20 Oct 2018
Modifié(e) : Myo Gyi le 27 Oct 2018
if true
% code
end
  1 commentaire
madhan ravi
madhan ravi le 20 Oct 2018
Upload your input datas to test

Connectez-vous pour commenter.

Réponse acceptée

jonas
jonas le 20 Oct 2018
Modifié(e) : jonas le 20 Oct 2018
What you see on the figure is a quiver3 plot, where the arrows describe velocity. You did not provide any velocity data, but you can make an arrow between every point in your plot as follows:
u = diff(x);
v = diff(y);
w = diff(z);
quiver3(x(1:end-1),y(1:end-1),z(1:end-1),u,v,w)
It is probably best to reduce the amount of data points, because you do not want 1500 arrows in your plot.
  14 commentaires
jonas
jonas le 26 Oct 2018
I don't understand. Quiver3 is really simple to use. The syntax is
quiver3(XStart, YStart, ZStart, XLength, YLength, ZLength,ScaleFactor)
then you can add various properties.
My code was just an example. Don't be afraid to actually change the values. If you want to change the range of the xaxis, then the syntax is.
set(gca,'xlim',[0 10])
What is a = 0.02?
Myo Gyi
Myo Gyi le 26 Oct 2018
par.a = 0.02 sir

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Vector Fields dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by