Table of Contents
RemoveSpin
Matrix.RemoveSpin(M) removes all even columns and even rows of matrix M.
Example
Input
- Example.Quanty
M = Matrix.New({{1,0,2,0}, {0,1,0,2}, {3,0,4,0}, {0,3,0,4}}) S = Matrix.RemoveSpin(M) print(M) print(S)
Result
{ { 1 , 0 , 2 , 0 } , { 0 , 1 , 0 , 2 } , { 3 , 0 , 4 , 0 } , { 0 , 3 , 0 , 4 } } { { 1 , 2 } , { 3 , 4 } }