|
"Steven Lord" <slord@mathworks.com> wrote in message <hg86nc$ka2$1@fred.mathworks.com>...
>
> "anis riahi" <riahianis1@gmail.com> wrote in message
> news:hg7jbb$k7a$1@fred.mathworks.com...
> >i have the same problem. i wanna find the optimum of complex vector but it
> >seems that fmincon work only with real parameters?
> > How can I manage this problem ?
>
> Convert your problem from one in N complex parameters into one in 2*N real
> parameters; inside your objective function, convert the 2*N-element real
> vector into an N-element complex vector and use the complex vector to
> evaluate the objective.
Just remember as well to make sure that the objective returns a purely real-valued result, i.e., if you are calculating the value of the objective (or its gradient etc...) using complex arithmetic operations, be sure to strip away any residual complex part of the result arising from round-off errors and so forth.
|