inverse of tan at 90 degree
4 次查看(过去 30 天)
显示 更早的评论
Hi.
Iam using "atand((y2-y1)/(x2-x1))" function to calculate angle. But i incure problem when my denomitor is zero. Sometimes it gives +90 and sometimes -90 degree, even though sign of cordinates of every point is same.
Please suggest way to resolve this issue.
1 个评论
James Tursa
2021-5-25
Please give specific example, with numbers, to show where you are getting +90 and -90 even though you think the signs of the inputs are the same.
回答(1 个)
Star Strider
2021-5-25
y2 = 20;
y1 = 10;
x2 = 42;
x1 = 42;
Theta1 = atan2d((y2-y1), (x2-x1))
y2 = 10;
y1 = 20;
x2 = 42;
x1 = 42;
Theta2 = atan2d((y2-y1), (x2-x1))
.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Trigonometry 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!