How can you determine the mean and standard deviation on a polar histogram?
8 views (last 30 days)
Show older comments
Hello,
I am currently trying to find mean and standard deviation of my data during cycling. Each partcipant has 30 revolutions of pedaling and I found the angles where the peak values occur in each revolution. For some variables, the angles are distributed from mid 300 degrees to 90 degrees, which will be cancelled out when you just take the mean. So, I was wondering if there is any way to calculate the mean without cancelling out. I have attached sample data and figure below:
load example
min(example)
max(example)
polarhistogram(example,'BinWidth',deg2rad(10))
set(gca,'ThetaZeroLocation','top','ThetaDir','clockwise')
If you have any suggestions or insights, please let me know. Thank you.
3 Comments
Walter Roberson
on 28 Feb 2024
load example
norm_angle = example;
mask = norm_angle > pi;
norm_angle(mask) = norm_angle(mask) - 2*pi;
mean_angle = mean(norm_angle);
mean(mean_angle)
Answers (1)
Walter Roberson
on 28 Feb 2024
You have to do something like
norm_angle = Angles;
mask = norm_angle > 180;
norm_angle(mask) = norm_angle(mask) - 360;
mean_angle = mean(norm_angle);
See Also
Categories
Find more on Descriptive Statistics and Visualization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!