CHAN_MULT
1
BRL-CAD
BRL-CAD

# chan_mult

multiply columns of data by a given factor

# chan_add

add a given value to columns of data

      chan_mult    factor
        num_columns
        column
        columncolumn
        <
        infile
        >
        outfile

      chan_add    value
        num_columns
        column
        columncolumn
        <
        infile
        >
        outfile

## DESCRIPTION

Mult_chan will multiply all numbers in the specified columns by the given factor. The infile is an ASCII file, with columns separated by white space. The columns are numbered from 0 to (n-1). Add_chan behaves analogously, but with addition rather than multiplication.

## EXAMPLES

These routines are useful for converting between units in animation tables.

To multiply all but the first column of a four column file by 2.54:

chan_mult 2.54 4 1 2 3

To add ten to the first six columns of an eight-column file:

chan_add 10.0 8 0 1 2 3 4 5

To convert the second of three columns from Fahrenheit to Celsius:

chan_add -32 3 1 chan_mult 0.56 3 1

## BUGS

The files must contain numbers and whitespaces only.

## AUTHOR

Carl J. Nuzman

## COPYRIGHT

This software is Copyright (c) 1994-2013 by the United States Government as represented by U.S. Army Research Laboratory.

## BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to <devs@brlcad.org>.