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
Hossein 2016년 6월 13일
Hi Could you solve the problem? I have faced the similar problem, yet cannot solve it.
John D'Errico
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.
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에 대해 자세히 알아보기

태그

질문:

2013년 10월 16일

댓글:

2016년 6월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by