ADD (Animal Breeder's Tool Kit) ADD NAME add, subtract - add or subtract matrices SYNOPSIS add [-z](matrix file) [-z](matrix file) (output matrix) subtract [-z](matrix file) [-z](matrix file) (output matrix) DESCRIPTION add adds two input matrices, writing the output matrix file to contain the resulting matrix. subtract subtracts the second input matrix from the first, writing the output matrix file to contain the resulting matrix. The input matrix file(s) may be different files representing different matrices or the same file, in which case the matrix will be added to, or subtracted from itself. If a dash (-) is used for the output matrix, the resulting matrix will be written to standard output. One input matrix file may also be a dash (-), indicating standard input from a process writing a matrix with a header record to standard output. The -z option is used to indicate compressed input matrix files. Detected errors, such as non-conforming input matrices, will be reported to standard error and the process will abort. EXAMPLE add -zI -zI - | subtract - -zI - | compress >I2.Z will add the matrix described by the compressed file I.Z to itself and subtract the same matrix from the result of the add. The final result is compressed to create the file I2.Z. In this example, the input file I.Z and the output file I2.Z will represent the same matrix. SEE ALSO sadd