Transform angles that are -180 to +180 to angles that are in the 0-360 degree range?
74 views (last 30 days)
I am implementing a vector coding technique in matlab using the atan2d(diff(y),diff(x)) function, but the results are from -180 to +180 and I would like to have a 0-360 range. I tried to input an if statement for angles < 0 to have 360 added to them, but I couldn't get it to work. It is possible that I just didn't write the statement correctly, but I would appreciate any tips or advice.
More Answers (1)
theodore panagos on 5 Dec 2018
A formula to calculate an angle counter clockwise from x positive to 360 degrees: