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

63.64% Correct | 36.36% Incorrect
Last Solution submitted on Oct 23, 2025

Solution Comments

Show comments