nonlinear complex equation using fminsearch
古いコメントを表示
Hi
I want to solve equation like below with using Matlab - fminsearch function- but results shows that if initial value changes then results for function will be different. Can you help me to solve the nonlinear complex equation like this? (a is complex =a’+ia”)
f(a)=(a-i+1)(a+i-1)/(a^2+1)=0
For other samples when f(x)=f’(x)+if”(x) too.
3 件のコメント
Hossein
2016 年 6 月 13 日
Hi Could you solve the problem? I have faced the similar problem, yet cannot solve it.
John D'Errico
2016 年 6 月 13 日
編集済み: John D'Errico
2016 年 6 月 13 日
Note that fminsearch does not apply to complex results. This is essentially true of all optimizers, since a complex number is truly a vector quantity. Optimizers like fminsearch can only be used on scalar valued functions.
Anyway, the complex numbers do not have a simple relational operator that applies to them, so one cannot say that if a and b are complex numbers, that a<b or a> b. You CAN choose to compare only the real part of those numbers, or the magnitude, etc.
In MATLAB, the relational operators (inequality tests) apply to the real parts of a number, comparing only that aspect.
Roger Stafford
2016 年 6 月 14 日
In the case of your equation “(a-i+1)(a+i-1)/(a^2+1)=0” the two solutions are obvious, namely
a = i-1
and
a = 1-i
This is because a quotient of finite complex numbers is zero if and only if the numerator is zero, and a product of finite complex numbers is zero if and only if one or both of the factors is zero.
Quite aside from not being able to handle complex values, the ‘fminsearch’ function is totally inappropriate for solving your equations. You are not asking for a minimum, but rather the solution to an exact equation.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!