Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How to calculate the angle between two lines (an urgent help needed)

2 Ansichten (letzte 30 Tage)
Fahad
Fahad am 11 Okt. 2012
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

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 11 Okt. 2012
Bearbeitet: Azzi Abdelmalek am 11 Okt. 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)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by