I have 5 variables x1,x2,x3,x4 and x5. each is a 4×1 column vector and I want to generate a matrix that holds the different possible combinations of these 5 variables such that the sum of their product(x1'*x1 +x2'*x2+ x3'*x3 +x4'*x4+ x5'*x5) is less than 10. the elements of the 5 variables x are non-negative integers.
MATLAB: Generating combinations under certain constraints
combinationmatrix
Best Answer