Understanding of the function 'dist'
Afficher commentaires plus anciens
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 commentaires
Adam
le 12 Août 2014
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!