Fsolve function does not solve a nonlinear system with complex conjugation.

10 ビュー (過去 30 日間)
Amir Usmanov
Amir Usmanov 2019 年 12 月 22 日
コメント済み: Matt J 2020 年 1 月 23 日
Hello, I beg you help me with important part of my future diploma. Part of my code for solving nonlinear equations does not work. I used function ansver3:
function F = ansver3(D1,D2,D3,D4,D5,D6,Int1,Int21,Int22,Int23,x)
F(1,1) =x(1).*D1+x(2).*D2+x(3).*D3;
F(2,1) =x(1).*D4+x(2).*D5+x(3).*D6;
F(3,1)=(x(1).*conj(x(1))).*Int1+(x(2).*conj(x(2))).*Int21+(conj(x(3)).*x(2)+...
conj(x(2)).*x(3)).*Int22+(conj(x(3)).*x(3))*Int23-1;
After, I applied this function in fsolve:
X0=[1+i,1+i,1+i];
Ss=fsolve(@(x)ansver3(D1,D2,D3,D4,D5,D6,Int1,Int21,Int22,Int23,x),X0);
All answers was:
No solution found.
fsolve stopped because the relative size of the current step is less than the value of the step size tolerance squared, but the vector of function values is not near zero as measured by the value of the function tolerance.
In my code only D1, D4, Int1 are real numbers, other are complex. Before this attempt, I tried to solve this system with solve function but got 0-by-1 if in third equation in system I had used conj function. Please, help me with solution of this system.
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 1 月 21 日
It is often the case that you can get better results on fsolve() of a complex-valued system by splitting real and imaginary components, such as
function F = ansver3(D1,D2,D3,D4,D5,D6,Int1,Int21,Int22,Int23,x)
F11 =x(1).*D1+x(2).*D2+x(3).*D3;
F21 =x(1).*D4+x(2).*D5+x(3).*D6;
F31=(x(1).*conj(x(1))).*Int1+(x(2).*conj(x(2))).*Int21+(conj(x(3)).*x(2)+...
conj(x(2)).*x(3)).*Int22+(conj(x(3)).*x(3))*Int23-1;
F = [real(F11); imag(F11); real(F21); imag(F21); real(F31); imag(F31)];

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

回答 (1 件)

Star Strider
Star Strider 2019 年 12 月 22 日
If you are absolutely certain that your function has identifiable roots, choose different initial parameter estimates. (Nonlinear parameter estimation functions are extremely sensitive to the initial parameter estimates.)
  2 件のコメント
Star Strider
Star Strider 2020 年 1 月 21 日
Amir Usmanov’s Comment posted as an Answer moved here —
Thanks for the help, I will try to do so.
Star Strider
Star Strider 2020 年 1 月 21 日
My pleasure!

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

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by