atan(t) function quadrant issues, atan2(x,y) not an option

2 ビュー (過去 30 日間)
sono
sono 2012 年 10 月 4 日
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

採用された回答

Walter Roberson
Walter Roberson 2012 年 10 月 4 日
Your "reflex angle" appears to be mod(angle, 360)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by