Theta phi positive and negative conventions and conversions

조회 수: 1 (최근 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 CenterFile Exchange에서 Cartesian Coordinate System Conversion에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by