3 Variables in 3 Equations (nonlinear)

2 ビュー (過去 30 日間)
Ilya Tcenov
Ilya Tcenov 2019 年 9 月 21 日
コメント済み: Ilya Tcenov 2019 年 9 月 21 日
Hi all.
I have to solve the following equations:
  • A1*X + A2*Y + A3*Z = A4 (a plane)
  • B1*X + B2*Y + B3*Z = B4 (a plane)
  • (X-T1)^2 + (Y-T2)^2 + (Z-T3)^2 = D^2 (a sphere)
,where A,B,T,D are known constants, and X Y Z are the solution that I am looking for.
There are exactly 2 possible solutions (intersection points between two planes and a sphere), and I know how to choose the right one (based on the signs of X Y Z).
The main problem is that I have to solve these equations in a for loop (millions of times), where each iteration A and B change, therefore I need to do it as efficiently as possible.
I tried using "fsolve", but it takes much longer than I can allow.
One possible way is to calculate the intersection line between the two planes, and look for a point on that line that satisfies the third equation.
Is there a simpler way you can think of to calculate X Y Z in a loop? Can I somehow get rid of the loops and calculate the entire set of points at once?
Thank you.

採用された回答

jeewan atwal
jeewan atwal 2019 年 9 月 21 日
USE Multidimensional Newton-Raphson method to solve non-linear eqs.
  1 件のコメント
Ilya Tcenov
Ilya Tcenov 2019 年 9 月 21 日
Thanks!
Worked great.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSystems of Nonlinear Equations についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by