What is the angle of vector conecting two points?

2 visualizaciones (últimos 30 días)
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah el 19 de Mayo de 2016
Comentada: K M Ibrahim Khalilullah el 19 de Mayo de 2016
Suppose I have two points P1(x1,y1) and P2(x2,y2). How can I calculate angle of vector connecting the two points?
  2 comentarios
TastyPastry
TastyPastry el 19 de Mayo de 2016
The angle of the vector and what? The x or y axis?
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah el 19 de Mayo de 2016
no, for pixels of an image. It is related to the direction...

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 19 de Mayo de 2016
Angle means, it shall be anti-clockwise with respect to x -axis... use: theta = atan((y2-y1)/(x2-x1))
  1 comentario
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah el 19 de Mayo de 2016
thanks for reply>>Actually I need directional vector of the line connecting two point.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by