Theta phi positive and negative conventions and conversions

2 ビュー (過去 30 日間)
Albert
Albert 2021 年 8 月 3 日
コメント済み: Albert 2021 年 8 月 5 日
Hi, how can I convert any (theta_i,phi_i) angular coordinate so that it is restricted only to values where theta_i goes from 0º to 180º and phi from 0º to 360º ? My inmediate answer would be just to add 360º to any negative angle, but this may not be completely correct because it is possible that I need to change the other angle even if positive? Thanks

採用された回答

Alan Stevens
Alan Stevens 2021 年 8 月 3 日
Try
mod(theta,180)
and
mod(phi,360)
  1 件のコメント
Albert
Albert 2021 年 8 月 5 日
Thanks! I may need to think further on this, because it's a matter of coordinate system definition in fact. If I define theta -90 to 90 instead of 0 to 180, then maybe the phi angle needs to adapt accordingly. Other than that your answer makes sense.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePhysical and Time Unit Conversions についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by