Scale any angle between [0, 180] and [0,-181] degrees
Show older comments
How do I scale any angle that I get to be between 0 and +/-180 degrees? So lets say I have 750 degrees, I want the output to be 30. However, if I have 950, I want the output to be -130.
Accepted Answer
More Answers (1)
Walter Roberson
on 27 Nov 2017
temp = mod(angle, 360);
mask = temp > 180;
temp(mask) = 180 - temp(mask);
Categories
Find more on Aerospace Blockset in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!