I am using nonlin_residmin (optim 1.5.2) with fixed upper and lower

bounds on the parameters. Now I want to introduce non-linear inequality

constraints.

I was assuming

# working if I do not use inequc below

settings = optimset(settings, 'lbound', lb' , 'ubound', ub');

settings = optimset (settings, "inequc", {@nonlinear_ineq_constraints});

with

function H = nonlinear_ineq_constraints(x)

h0 = 1 - get_ic0(x)^2 - get_jc0(x)^2 - get_kc0(x)^2; # >= 0

h1 = 1 - get_ic1(x)^2 - get_jc1(x)^2 - get_kc1(x)^2; # >= 0

h2 = 1 - get_ic2(x)^2 - get_jc2(x)^2 - get_kc2(x)^2; # >= 0

H = [h0;h1;h2];

endfunction

would do it, but I keep getting

error: number of columns must match

error: called from

__nonlin_residmin__> at line -1 column -1

__nonlin_residmin__> at line -1 column -1

__nonlin_residmin__> at line -1 column -1

__lm_svd__ at line 181 column 6

__nonlin_residmin__ at line 1133 column 21

nonlin_residmin at line 98 column 21

solve1.m at line 419 column 29

error: evaluating argument list element number 2

error: called from

__nonlin_residmin__> at line -1 column -1

__nonlin_residmin__> at line -1 column -1

__nonlin_residmin__> at line -1 column -1

__lm_svd__ at line 181 column 6

__nonlin_residmin__ at line 1133 column 21

nonlin_residmin at line 98 column 21

solve1.m at line 419 column 29

error: evaluating argument list element number 4

error: called from

__nonlin_residmin__> at line -1 column -1

__nonlin_residmin__> at line -1 column -1

__nonlin_residmin__> at line -1 column -1

__lm_svd__ at line 181 column 6

__nonlin_residmin__ at line 1133 column 21

nonlin_residmin at line 98 column 21

solve1.m at line 419 column 29

error: evaluating argument list element number 3

error: called from

__nonlin_residmin__> at line -1 column -1

__lm_svd__ at line 181 column 6

__nonlin_residmin__ at line 1133 column 21

nonlin_residmin at line 98 column 21

solve1.m at line 419 column 29

the error is thrown when executing

dct = df_cstr (p, ac_idx, ...

setfield (dfdp_hook, "f", v_cstr));

Could someone send me a trivial working example or tell me what I am

doing wrong?

--

Philippe Dobbelaere

Bell Labs, Nokia

Contact number +32 3 240 8217

-----------------------------------------

Join us March 12-15 at CERN near Geneva

Switzerland for OctConf 2018. More info:

https://wiki.octave.org/OctConf_2018-----------------------------------------