title: Create a matrix in MATLAB with limited number of elements
body: <p>I would like to create an 12*3 matrix in MATLAB that has only 2 non-zero elements in each row. How should I generate a code to get all the possible conditions. The non-zero elements can take on any integers from 1 to 2.</p>