I am repeating a question (non-negative integer solutions to system of linear equations in mathematica) here for MATLAB.
Say I have a system of linear equations and inequalities (or boundary). I want ALL possible non-negative integer solutions of the system. In Mathematica, the function is reduce. But I am not sure whether MATLAB has a similar function.
Example:
Problem:
x1 + x3 + x4 = 3
x2 + x3 = 3
x1, x2, x3, x4 >= 0
Solution:
x1 x2 x3 x4
3 3 0 0
2 2 1 0
1 1 2 0
0 0 3 0
2 3 0 1
1 2 1 1
0 1 2 1
1 3 0 2
0 2 1 2
0 3 0 3