Subject: Re: sqp in octave 3.6.4 vs. in octave 3.2.4
Unfortunately, I have no "simple" test case, but the crucial steps are the following:
function mini=minimize6(b)
funp6wrap = @(x)funp6(x,[real(b),imag(b)])
y0 = 2*ones(7,1);
lbound = [0.5,0.5,0.5,0.5,0.5,0.5,5]';
ubound = [20,20,20,20,20,20,200]';
mini=sqp (y0,funp6wrap,[],[],lbound,ubound)
endfunction
function erg=funp6(x,p)
erg=(p(1)-real(dominant2(roots(poly(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2+(p(2)-imag(dominant2(roots(poly(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2
endfunction
Here b is a complex number and poly(x(1),x(2),x(3),x(4),x(5),x(6),x(7)) is a polynomial of degree 7, parametrized by the seven real parameters x(1),x(2),x(3),x(4),x(5),x(6) and x(7). Note that poly is here not octave's build-in-function poly.m. dominant2 selects the root of the polynomial with the biggest real part.