Degrees or Radians for angle data?
14 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
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
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
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 Center および File Exchange で Calendar についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!