Info
This question is closed. Reopen it to edit or answer.
How to calculate the angle between two lines (an urgent help needed)
2 views (last 30 days)
Show older comments
Does anyone have any idea how to calculate two lines between four points. For example Line1= [x1,y1], [x2,y2] and Line2= [x3,y3], [x4,y4]. Then calculating the angle between these two lines.
I have found codes but they didn't work with me.
Thanks,
Fahad
1 Comment
Answers (1)
Azzi Abdelmalek
on 11 Oct 2012
Edited: Azzi Abdelmalek
on 11 Oct 2012
x1=2 ;y1=4;x2=3;y2=10
x3=1;y3=5;x4=6;y4=20
v1=(x2-x1)+j*(y2-y1)
v2=(x4-x3)+j*(y4-y3)
teta=angle(v2)-angle(v1)
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!