Solve nonlinear complex equations
Ältere Kommentare anzeigen
Hello,
I am trying to numerically solve a nonlinear complex equation and I would like to find all the complex roots. The equation is of the type:
cot(z)*z = 1-z^2*(1+i*z)
Does a specific function exist to find all the complex roots or do I need to separate z in the real and imaginary parts?
Thanks in advance for your help!
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 10 Feb. 2013
Use fzero function
doc fzero
f=@(z)cot(z)*z -(1-z^2*(1+i*z))
z0=i;
sol=fzero(f,z0); % the solution is near z0
2 Kommentare
It's interesting that this worked for z0=i, but it appears to be just a fluke. FZERO can't really handle complex-valued functions. Note,
>> sol=fzero(f,1+i)
Error using fzero (line 309)
Function value at starting guess must be finite and real.
Ed
am 10 Feb. 2013
Kategorien
Mehr zu Solver-Based Nonlinear Optimization finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!