Question: How to make entries in the last row to be the same, whatever the column dimension is

 

For example, the column dimension is 6 and I ran the following command,

A := Mod(2,Matrix(3,6,(i,j)->if i<2 and j < 3 then 1  elif i = 2 and j > 2 and j <5 then 1 else 0 end if),float[8])

the result is the following matrix with the last row containing all 0s. 

A := Matrix(3, 6, [[1., 1., 0., 0., 0., 0.], [0., 0., 1., 1., 0., 0.], [0., 0., 0., 0., 0., 0.]])
Actually, I want the last row containing all 1s but I do not know how.
Any help?

 

Please Wait...