Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the trigonometric circular moment
ResourceFunction["CircularMoment"][list,p] calculates the p-th power trigonometric circular moment of list. | |
ResourceFunction["CircularMoment"][list→weights,p] uses the weights weights. |
Calculate the magnitude and angle of the second moment of some angular data:
| In[1]:= |
| Out[1]= |
Use some weights:
| In[2]:= | ![]() |
| Out[4]= |
Powers do not have to be integers:
| In[5]:= |
| Out[5]= |
The first order agrees with the "CircularMean" resource function:
| In[6]:= |
| Out[7]= |
An empty list spawns an error:
| In[8]:= |
| Out[8]= |
The data and the weights should have the same lengths:
| In[9]:= |
| Out[9]= |
Visualize the circular moment for the first 10 powers of some random data that is uniformly distributed between 0 and π/3:
| In[10]:= | ![]() |
| Out[13]= | ![]() |
Plot the magnitude as a function of the power:
| In[14]:= | ![]() |
| Out[16]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License