Gathering coeffients into a matrix

2 Ansichten (letzte 30 Tage)
Nick Drake
Nick Drake am 10 Feb. 2012
Hello, I am working with converting a linear complementarity problem into an MILP problem; the LCP is defined as find a w and x =>0 such that w= Mx+q, w^tx=0. The conversion to MILP is as follows max a a, y, z st 0<=(My)+aq<= z 0<=y<=1-z 0<=a z = 0 or 1 e is the vector(array) of all ones.
now I want to write a code in MATlab that will do the formulations of the constraints and gather the coefficients of the variables (like gathering 2x1+ 3y1; 4x2 +7y2 into a matrix b = [2 3; 4 7]). I am at a real loss of how to gather the coefficients and any possible help would be great. I would also like to stay away from the using symbolic expressions to solve the constraints.
Thanks in advance
Nick

Antworten (0)

Kategorien

Mehr zu Oceanography and Hydrology finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by