how to force lsqnonlin in matlab to give only real output?

Hello everyone
I have an optimization problem and I want to solve it with lsqnonlin
[x,resnorm] =lsqnonlin(fun,x0)
fun is a complex function and so the resnorm. but x0 is real and x supposed to be real too but always become complex. How can I force lsqnonlin to give only real value for x?

Respuestas (0)

Categorías

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

Preguntada:

el 3 de Oct. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by