Constraining the columns of a Matrix

In reply to Shashank Gurijala:

j iterates from 0 to Y-1.