MATLAB: Solving linear set of equations

linear algebra

Hi,
I have a linear set of equations Ax=b, where A is not square (more variables than equations), A and b members is of integer type, and the vector x members needs to be integer>=0. which function from the MATLAB C++ math library can I use to solve this equation? (inv() works on square, non-singular matrixes) I would also like MATLAB to warn me if there is no solution..

Best Answer

What you describe would essentially be a set of simultaneous knapsack problems; such problems are not solvable by linear equation methods. See http://en.wikipedia.org/wiki/Knapsack_problem
Related Question