find angle between lines

hello
i need to find the angles between lines
how can i do in code

1 个评论

John D'Errico
John D'Errico 2018-12-25
编辑:John D'Errico 2018-12-25
As a hint:
That will suffice. Why not try it?
Or, you could find the inclination of each line, best done using atan2. Then subtract. That too will work, as long as you are careful.

请先登录,再进行评论。

 采纳的回答

madhan ravi
madhan ravi 2018-12-25

0 个投票

5 个评论

hello,
can you tell me in terms of my points the same formule
i have 3 points its formulated for 4 points
one point is common for both the lines
dont get me wrong can u formulate for 3 points
x = [800 905]; % common point
y = [250 330];
a = [800 905]; % common point
b = [825 333];
angle_between = (atan((y(2)-y(1))/(x(2)-x(1)))...
- atan((b(2)-b(1))/(a(2)-a(1)))) * 180/pi % in degrees

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Elementary Math 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by