How to find angles, which lies between -π and -2π.Because matlab returns only values between ±π using atan or atand function.

4 ビュー (過去 30 日間)
gfgf99
gfgf99 2015 年 6 月 2 日
コメント済み: Walter Roberson 2015 年 6 月 2 日
Because matlab returns only values between ±π using 'atan' or 'atand 'functions.i want to get an angle between -π and -2π. Are there any solution to do that using functions? i'm finding a solution without using a absolute value(abs function)
thank you
  2 件のコメント
gfgf99
gfgf99 2015 年 6 月 2 日
編集済み: gfgf99 2015 年 6 月 2 日
simply, i want to plot(scatter) angles without discontinuity which range are lying between 0 to 2π .ex: circular data points(point cloud) angles.
Walter Roberson
Walter Roberson 2015 年 6 月 2 日
Yes, use unwrap(). It will get rid of discontinuities.

サインインしてコメントする。

回答 (2 件)

Roger Stafford
Roger Stafford 2015 年 6 月 2 日
Do this to your angle, 'a':
a = mod(a,pi)-2*pi;
It will then lie between -2*pi and -pi.
[Note: atan gives angles between -pi/2 and +pi/2, not -pi and +pi.]

Walter Roberson
Walter Roberson 2015 年 6 月 2 日

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by