zct Options Rows[:Columns] Input Output
Here are some examples. Assume the input is the following 5 by 10 matrix
1 2 3 4 5 6 7 8 9 0 0 1 2 3 4 5 6 7 8 9 0 0 1 2 3 4 5 6 7 8 0 0 0 0 0 0 0 0 0 0 9 8 7 6 5 4 3 2 1 0Then, zct would produce the output shown below for different Rows:Columns lists:
Rows:Columns Result ----------------- ------------------- 1,4-5 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0 9 8 7 6 5 4 3 2 1 0
1-3:8-10 8 9 0 7 8 9 6 7 8
1-2:2,5-7,9 2 5 6 7 9 1 4 5 6 8
1-2,5:1-3,9-10 1 2 3 9 0 0 1 2 8 9 9 8 7 1 0The rows and columns which select the piece need not occur in ascending order, but the output depends on the ordering. For example,
zct 1,2 output input zct 2,1 output inputboth extract the first two rows of `input', but the second form will also permute the rows. Another example:
zct 3-4,1-2:3-4,1-2 inp outwould perform the following operation on a 4 by 4 matrix:
inp out 1 1 2 2 4 4 3 3 1 1 2 2 4 4 3 3 3 3 4 4 2 2 1 1 3 3 4 4 2 2 1 1With permutations the program works in the same way as with matrices. Each permutation is treated as a row. The Columns list must be empty in this case, because zct can cut only entire permutations.