How to solve large linear complex equations

3 ビュー (過去 30 日間)
Shengfan Bi
Shengfan Bi 2023 年 12 月 6 日
コメント済み: Matt J 2023 年 12 月 6 日
The equations are of the following form:
,
where is known.
“Subsitituting into ,we can obtain 14 linear complex equations. By solving 28 linear equations, we can determine the values for .”
How do I solve the imaginary part and the real part
I plan to use the lsqnonlin function for solving, but there are too many unknowns and defining them with syms becomes cumbersome. Is there a better way to solve this problem?

採用された回答

Matt J
Matt J 2023 年 12 月 6 日
編集済み: Dyuman Joshi 2023 年 12 月 6 日
Since it is a linear and unconstrained system of equations, just use mldivide, \
  4 件のコメント
Shengfan Bi
Shengfan Bi 2023 年 12 月 6 日
Thank you for your response. Here is my code where I separate the imaginary and real parts for computation.
syms phi_delta_real [14 1] real %Declaration
eqns_real=real(sum(conj(phi_delta_real)./(delta_i-2*delta_i).^2))+real(1./delta_i.^2-phi_delta_real);%Objective equation
vars=phi_delta_real;
[A,b] = equationsToMatrix(eqns_real,vars);
x=linsolve(A,b);%Linear solution
Matt J
Matt J 2023 年 12 月 6 日
Here is my code where I separate the imaginary and real parts for computation.
I'm not sure you need to do that, but regardless, if your question is now resolved, please Accept-click the Answer.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by