Problem 61033. The MATLAB Treasure Hunt – Fix the Broken Compass by Normalizing Its Angle Readings
Your compass, recovered from the Hidden Cave, spins wildly! The ancient device shows angles that exceed 360° or drop below 0°. To follow the treasure trail, you must normalize each angle so it lies between 0° and 359°.
Given a vector a of compass readings (in degrees), return a vector b containing each reading normalized to this range. Use modulo arithmetic — your MATLAB compass is the key to the next map clue!
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
More from this Author22
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!