Rotate Spherical Coordinates to find new Vector Magnitude

11 ビュー (過去 30 日間)
Chad
Chad 2020 年 9 月 28 日
コメント済み: Chad 2020 年 9 月 29 日
Dear Forum,
I am given a ,,. Does Matlab have a function to convert and find the from a new ?
  6 件のコメント
Chad
Chad 2020 年 9 月 28 日
If I am given a vector in either x,y,z or what is the vector magnitude with a known . It can be negative.
Ameer Hamza
Ameer Hamza 2020 年 9 月 29 日
In case when r1=100, theta1=0, and phi1=0, and if by the negative value of r, you mean reversing the position vector, then in that case, you can say that r1=-100, theta1=180, and phi1=0 is equivalent to the first vector. But for any other value of theta and phi, you cannot get the same vector.

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

採用された回答

Sindar
Sindar 2020 年 9 月 29 日
It sounds like the goal is to find the projection of the vector along the direction defined by theta=100, phi=150. If this is the case, one way is:
[x2,y2,z2] = sph2cart(150*pi/180,100*pi/180,1);
[x1,y1,z1] = sph2cart(phi1*pi/180,theta1*pi/180,r1);
v12_proj = x1.*x2 + y1.*y2 + z1.*z2;
  1 件のコメント
Chad
Chad 2020 年 9 月 29 日
Yes. This is what I was after. Thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Geodesy についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by