Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
atan2 angles

Subject: atan2 angles

From: Fran

Date: 11 Apr, 2013 21:59:07

Message: 1 of 1


It's a bit embarrassing asking this owing to the simplicity but I am trying to do this:

given a vector from (0,0) to a point on a y-x axis (y pointing North, and x pointing to the East)...

calculate the angle between the positive Y axis and the vector.
1) I would like that if the vector lies on the positive Y i get 0 degrees.
2) The angle should increase as it goes ANTICLOCKWISE
3) I can only have values from 0-360 degrees.

Is it possible to avoid using IF loops and whatnot?

I think you need to use atan2...?

Please help.

Kind Regards,


Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us