If the matrix Aeq in linear constraint Aeq*x=beq have parameters,how can this kind of problem be solved using the function fmincon to obtain the optimized parameters in matrix A?
Best Answer
Hi Ashley,
do I understand correctly: there are two entries in Aeq which you want to optimize as well? In this case Walter is right: you would need to put into the non linear constraint function (and add to the variables), i.e., your x will be in fact [x_1,...,x_n,A_1,A_2], where A_1 and A_2 do nothing in the objective function, but will be used in the constraint function (something like)
No.fmincon() says that A, b, Aeq, and beq must be matrices. Function handles are not allowed for them. Only the objective function and the nonlinear constraint function can be function handles.
MultiStart does not return the Hessian. But, if you really want the Hessian for computing confidence intervals, you shouldn't use the fmincon Hessian anyway, because,as documented, it is inaccurate.
I do not know what the confidence interval calculation is when there are active constraints in a maximum likelihood calculation. If, at the end of the calculation, there are no active constraints, then you can call fminunc on the function at the final point.As documented, fminunc Hessians are accurate.
Best Answer