Hi, I'm using the function atan2, however my output is from -180 to 180 degrees (I converted from radians) How do I modify it such that it outputs a value from 0-360 degrees?

winddir = (atan2(Vi,Ui))*(180/pi);

Skip to content# MATLAB: Converting atan2 output to 360 deg

###### Related Question

atan2

Hi, I'm using the function atan2, however my output is from -180 to 180 degrees (I converted from radians) How do I modify it such that it outputs a value from 0-360 degrees?

winddir = (atan2(Vi,Ui))*(180/pi);

- How to convert [-90 90] range of elevation angel in imgradient3 to [0 , 180]
- Direction between points from [0,360]
- How to convert x-y-data in a 2D plot to a range of 0..360 degrees
- Transform angles that are -180 to +180 to angles that are in the 0-360 degree range
- How to specify points outside a polygon

## Best Answer