MATLAB: Atan(t) function quadrant issues, atan2(x,y) not an option

angleatanatan2quadrantreflex

1) Is there a command in matlab to find the reflex angle?
I can write a script to do it but I would hope a function already exists. Something along these lines:
angle = 500
500/360 = 1.3889
360*0.3889 = 140.0040
1.1) The "atan(t)" function does not properly work for angles in quadrants other then the first one. Matlab has the "atan2(x,y)" function for that but lets say we are working with angles only and don't know "x" or "y" or "hypotenuse", and since we don't know the "quadrant" either we can't really use "asin(t)" or "acos(t)" or "atan(t)" to find them; paradox as that's what we want in the first place.
I am writing a script right now to basically compute the reflex angle then figure out what quadrant it's in then add either "nothing" or "pi" or "2pi" to "atan(t)" to get the appropriate "atan(t)" angle value.
I was really hoping a function that does all this already exists in matlab as it seems pretty rudimentary. Anyone know if it actually exists?
Thanks

Best Answer

Your "reflex angle" appears to be mod(angle, 360)
Related Question