fmincon - matrix A depends on x

Helly everyone,
I have looked for a solution on Matlab central but I did not find anyone.
I would like to use the function fmincon in order to minimize a non linear function.
My problem is that the coefficients in the A matrix are dependent on x. I have a lookup table in 3D in Excel to get the coefficients of A. The values, also depending on x, of the function f have to be read also in a lookup table in the Excel file.
Is it possible to use the function fmincon in this case? If yes, could you give me an idea of how can I do it please?
I hope that I made myself clear and thanks you in advance for the help.
Thanks you,

 Accepted Answer

Sean de Wolski
Sean de Wolski on 9 Sep 2013
Hi Chamun,
Since A depends on the current value of x, these will be non-linear constraints. You will have to use the nonlcon option to fmincon

3 Comments

Hi Sean de Wolski,
thanks you for your answer. I still have to try to implement it but I think it will work. I did not think to use this option before.
I have a lookup table in 3D in Excel to get the coefficients of A.
Additionally, you will need to interpolate your look-up table at the current x using a twice differentiable interpolant (e.g., 'spline') so that A(x) is a twice-differentiable function of x. You must not use a discrete, x-dependent index to look up data in the table.
@Matt, Chamun,
It might make more sense to use patternsearch then.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!