How to state the compass direction between two coordinates
7 次查看(过去 30 天)
显示 更早的评论
What code can state the direction between two coordinates?
For example,
Input a,b;c,d (a,b to c,d)
a,b (x,y coordinates from place 1) to b,c (x,y coordinates to place 2)
Output: N,NE,E,SE,S,SW,W,NW or here (if it's the same place)?
Number examples:
Input: 1,1;1,2
Output = N
Input: 1,1:2,1
Output = E
Input 1,1:2,2
Output = NE
Input: 1,1:0,0
Output = SW
Input 13,13;13,13
Output = 'Here'
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!