a series of point coordinates are known, and their orientation (angle). Calculate gradient

6 vues (au cours des 30 derniers jours)
ZhG
ZhG le 27 Sep 2013
Commenté : ZhG le 27 Sep 2013
For example, 10 points' coordinates are known, as (xi, yi) i =1 ... 10 and a corresponding angle of each point is known, as ai
How I can calculate the gradient of each point and How does it show an arrow on the image for each point?
Thanks.

Réponses (1)

Image Analyst
Image Analyst le 27 Sep 2013
How can a bunch of points in a 2D plane, scattered all over the place, have a gradient? How did you get the angle at those points, but not the magnitude ?
Anyway, you can use quiver to put arrows on the picture.
  2 commentaires
ZhG
ZhG le 27 Sep 2013
I did it like
u = c*cos(ai)
v = c*sin(ai)
c is a constant, 0.2 for example
quiver(x,y u, v)
ZhG
ZhG le 27 Sep 2013
but the line with arrow is a little longer than I expected How can I control that?

Connectez-vous pour commenter.

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by