meanangle

Takes the mean of a vector of angles avoiding the 360-degree ambiguity.

You are now following this Submission

This function calculates the geometric mean of all input angles (in degrees), avoiding any 360-degree ambiguity. The input angles can be between [0 360] or [-180 180] degrees.
Example: anglemean([1 2 3 358],[0 360]) gives 1.0 as mean value.

Cite As

pascal de theije (2026). meanangle (https://www.mathworks.com/matlabcentral/fileexchange/3473-meanangle), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: adjustPolarAngles

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Added supporting function that is called from within 'meanangle.m'.