필터 지우기
필터 지우기

How can you determine the mean and standard deviation on a polar histogram?

조회 수: 6 (최근 30일)
Youngmin
Youngmin 2024년 2월 28일
댓글: Walter Roberson 2024년 2월 28일
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)
ans = 0
max(example)
ans = 6.2832
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
Youngmin
Youngmin 2024년 2월 28일
@VBBV Thank you for your comment. Of course, I can tell you more about it. As you can see in the example data above, the maximum peak angle is 6.283 rad but the minimum peak angle is 0 rad. Given that the data was obtained during 30 consecutive revolutions of pedaling, both can be considered the same pedal position where the pedals are located at the top. When you take the average values across all data, the mean value is ...
load example
mean(example)
ans = 1.5516
I do not think this mean value can accurately represent the data, as the actual mean value appears to be approximately 0.7 rad when angles greater than 6 rad are converted to negative angles (e.g., converting 6 rad to -0.2832 rad). So, I was wondering if there is any way to calculate the mean angle without the skewness of the data.
histogram(example,20)
Walter Roberson
Walter Roberson 2024년 2월 28일
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)
ans = 0.7138

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2024년 2월 28일
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);
  댓글 수: 1
Youngmin
Youngmin 2024년 2월 28일
@Walter Roberson Thank you for your response. Although it is possible to apply this code to this example, it may cause the same issue on other variables as other variables could have different ranges of the angle.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by