Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the mean of a collection of angles
ResourceFunction["CircularMean"][angles] computes the circular mean of the given angles. |
Generate random angles:
In[1]:= | ![]() |
Compute the circular mean:
In[2]:= | ![]() |
Out[2]= | ![]() |
Compute the mean:
In[3]:= | ![]() |
Out[3]= | ![]() |
Compare the two means visually. The blue array represents the circular mean and the red arrow represents the regular mean. Note how the circular mean is a more useful way to compute the mean value for angles:
In[4]:= | ![]() |
Out[4]= | ![]() |
Wolfram Language 14.0 (January 2024) or above
This work is licensed under a Creative Commons Attribution 4.0 International License