Gathering coeffients into a matrix

2 次查看(过去 30 天)
Nick Drake
Nick Drake 2012-2-10
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Oceanography and Hydrology 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by