What is this error

Hello everyone.
While using GlobalSearch in my global optimization routine, I incountered the following error:
Error using globalsearchnlp (line 110)
All elements of X must be real.
Im not able to open this file, "globalsearchnlp". What are these X? How can I fix it?
Many thanks!

2 个评论

Try
dbstop if error
before you execute your global search. It'll stop in the debugger then, maybe that'll enable you to find out what's wrong.
Any code examples you could provide?

请先登录,再进行评论。

 采纳的回答

Walter Roberson
Walter Roberson 2013-1-15

0 个投票

Your function evaluations are sometimes producing imaginary numbers. Be sure to put in appropriate bounds on your function range.

1 个评论

Yes, thank you. I found the place where my code produced complex numbers.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Global or Multiple Starting Point Search 的更多信息

产品

标签

Community Treasure Hunt

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

Start Hunting!

Translated by