Why do I get negative values when using circular_mean?

10 ビュー (過去 30 日間)
Carla van der Merwe
Carla van der Merwe 2018 年 4 月 12 日
回答済み: Walter Roberson 2018 年 4 月 13 日
I have an array 99x105. I want to work out the mean (dim 2).
This is what I have:
radxx=deg2rad(xx);
mxx=circ_mean(radxx,[],2);
mean_xx=radtodeg(mxx);

採用された回答

Walter Roberson
Walter Roberson 2018 年 4 月 13 日
Why not?
Round-off error can give negatives, for one thing.
angle() is used to get the angle. You can see from https://www.mathworks.com/help/matlab/ref/angle.html that it can return negative values. It is defined in terms of atan2(), which can give negative values. Everything between (pi, 2*pi) exclusive gives negative values.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by