Given an n\times m matrix M, with n<m, and a subset L\subseteq\{0,\dots,m-1\}\ of size n, this function replaces the columns with index L by an identity matrix.
i1 : S=ZZ[a_1..a_8]; |
i2 : M=matrix{toList(a_1..a_4),toList(a_5..a_8)}
o2 = | a_1 a_2 a_3 a_4 |
| a_5 a_6 a_7 a_8 |
2 4
o2 : Matrix S <--- S
|
i3 : affinePart(M,{0,2})
o3 = | 1 a_2 0 a_4 |
| 0 a_6 1 a_8 |
2 4
o3 : Matrix S <--- S
|
The object affinePart is a method function.