Understanding of the function 'dist'
이전 댓글 표시
Hi everyone,
So here's my problem - I am considering two points, let's say A and B, and I would like to know the heading of the point A from the point B (i.e. the angle between A and B and the direction of A - if A is going towards B or further away). For this, I am using the function [RANGE,AF,AR]= dist(lat,lon) as follows:
[rangeMeter,AF,AR] = dist([B.lat A.lat],[B.lon A.lon]);
My concern is that I do not really understand the results I got - how to understand the forward (AF) and reverse (AR) bearing ? Are there any similar functions that could lead me to what I want to find ?
Any help would be so much appreciated! Thanks!
댓글 수: 4
Adam
2014년 8월 12일
I can't see any dist function in Matlab apart from in the Neural Networks toolbox so I'm not sure which function you are using.
Can you not just do the maths as is though? Surely you just need to subtract the longitude and latitude of B from those of A to get the distance and direction and then do some trigonometry to get the angle?
I don't have the Neural Networks toolbox myself, but it sounds to me as though it is tailored towards specific cases of Neural Networks and if you just want general euclidean maths I would recommend keeping it simple. That is, unless I misunderstand your problem and you are in fact using Neural Networks
In this case I can't think of any builtin functions that will do all that you want, just trigonometry components.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!