# True north-based azimuths

11 views (last 30 days)
Cristian Martin on 22 May 2022
Commented: Cristian Martin on 22 May 2022
Can I automatically find True north-based azimuths based on certain value of an azimuth from a refference point ?
Let's say if I have a value of 90 the result will be East, I have a value of 25 the result will be North-northeast.
I could do a function but maybe there's more easier methodes.
Thank you!
##### 0 CommentsShowHide -1 older comments

Sign in to comment.

### Accepted Answer

Bjorn Gustavsson on 22 May 2022
Your question doesn't make much sense, sure you can do that - but that would be more of "establishing" your azimuth-convention. If you are thinking of calculating the azimuth clockwise from North to a point [x,y] from a point [x0,y0]. Then atan2 should be your friend:
phi = atan2(x0-x,y0-y);
Or atan2d if you directly want the angle in degrees - which I've found to be a dangerous habit to use, it is in my experience strongly preferable to have all angles in radians and convert to degrees when displaying.
HTH
##### 5 CommentsShowHide 4 older comments
Cristian Martin on 22 May 2022
Thanks Bjorn !

Sign in to comment.

### Categories

Find more on Modeling the Earth in Help Center and File Exchange

R2015a

### Community Treasure Hunt

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

Start Hunting!

Translated by