The outputs of fsolve function are complex

Hi all! I use the fsolve function by incorperating a interpreted matlab function block.The outputs of fsolve function are complex and the iteration is rather slow, but my expectation is real number, so what's the problem, how can i debug it?

 Respuesta aceptada

Youssef  Khmou
Youssef Khmou el 10 de Mayo de 2013
Editada: Youssef Khmou el 10 de Mayo de 2013

0 votos

hi,
it depends on the input function, for example the solution may contain a logarithm of negative value which is complex number,
you can use the 'abs' or 'real' function to the output.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by