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

OriAlpha
OriAlpha 2018년 12월 25일
hello,
can you tell me in terms of my points the same formule
OriAlpha
OriAlpha 2018년 12월 25일
i have 3 points its formulated for 4 points
madhan ravi
madhan ravi 2018년 12월 25일
one point is common for both the lines
OriAlpha
OriAlpha 2018년 12월 25일
dont get me wrong can u formulate for 3 points
madhan ravi
madhan ravi 2018년 12월 25일
편집: madhan ravi 2018년 12월 25일
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에 대해 자세히 알아보기

질문:

2018년 12월 25일

편집:

2018년 12월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by