Degrees or Radians for angle data?

조회 수: 7 (최근 30일)
Tim Bennett
Tim Bennett 2013년 4월 3일
I'm calculaing regression coefficients from three sets of angle data ([1 x 20] each) as predictor variables using the following code:
X = [ones(length(x1),1) x1' x2' x3'];
B = X\devY';
However, the coefficients obtained are completely different depending on whether I input the angle data as degrees or radians. Therefore,
1) Why does the change in units result in a large difference in the coefficients based on the same data? 2) The different coefficients mean I need to justify the units I will be using to calculate the coeffcients. Any help here would be appreciated.
Any help would be appreciated.
  댓글 수: 3
Image Analyst
Image Analyst 2013년 4월 3일
Do you also change the units of devY when you change the units of X?
Tim Bennett
Tim Bennett 2013년 4월 4일
Hi Walter,
the units of devY remain the same. The X predictor variables are joint angles and the Y output variables are related to the position of the foot in meters. I've will attach the code and data i'm using below.

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

답변 (1개)

the cyclist
the cyclist 2013년 4월 3일
Are you able to supply a small dataset that shows the problem you are talking about? As you describe it, a uniform factor (unit change) should certainly not affect the coefficients of your model.
  댓글 수: 7
the cyclist
the cyclist 2013년 4월 4일
편집: the cyclist 2013년 4월 4일
Your coefficients simply differ from each other by a factor of 180/pi, the conversion from radians to degrees. This is exactly as expected.
These coefficients presumably have units, just as the inputs do.
Matt Tearle
Matt Tearle 2013년 4월 4일
What the cyclist said. If you're solving Xb = y for b and X is in degrees and y is in meters, then b is in meters/degree. Switch X to radians and b will have to change to meters/radian as well.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by