
mat2viff(1)                  Khoros                   mat2viff(1)

PROGRAM
     mat2viff - converts a matrix to an image

SYNTAX
     mat2viff

     -i             input matrix

     -o             resulting output image

     [-V]           Gives the version for mat2viff

     [-U]           Gives the usage for mat2viff

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called mat2viff.ans
                    or file1

     [-a [file1]]   Uses mat2viff.ans or file1 as the answer file

DESCRIPTION
     The mat2viff routine will read a single matrix from the file
     specified and place it in an image structure.  It expects to
     see all comments prefixed by a pound ('#') sign.  Anything
     following this symbol on the same line will be ignored.
     Matrices are expected to be preceeded by either an open
     bracket ('[') or a "less than" symbol ('<') and succeeded by
     a close bracket (']') or a "greater than" symbol ('>'). For
     example:

             [ 4.0 3.0 2.0 1.0 ]

     Specifies a single row matrix with 4 elements.

     Each row, with the exception of the final row, of the matrix
     is expected to be delimited by a semicolon (';').  For exam-
     ple:

             [ 4.0 3.0 2.0 1.0 ;
               3.0 2.0 1.0 0.0 ]

     The above example specifies a two row matrix. Each row con-
     tains four elements.  Carraige returns are insignificant.
     The matrix above could be equivelantly input as:

             [ 4.0 3.0 2.0 1.0 ; 3.0 2.0 1.0 0.0 ]

     or as:

             [ 4.0 3.0 2.0
               1.0 ; 3.0 2.0
               1.0
               0.0
             ]

     Complex numbers are entered by enclosing them in parentheses
     ('()') and separating their real and imaginary parts by a
     comma (',').  For example:

             [ (4.0,3.0) ; (-3.0,2.0) ]

     If a complete row is not specified (i.e. not enough row ele-
     ments to complete a row), then the row will be zero padded.
     For example:

             [ 3.0 2.0 1.0 ; 3.0 -1.0 ;; 1.0 2.0 4 ]

     is equivelant to:

             [ 3.0  2.0  1.0 ;
               3.0 -1.0  0.0 ;
               0.0  0.0  0.0 ;
               1.0  2.0  4.0 ]

     The only major limitation of the current implementation is
     that the first row should contain the maximum number of ele-
     ments that a row will have in the entire matrix explicitly
     specified.  Failure to comply with this limitation will
     result in illogical, erroneous, and ridiculous results.

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input matrix

     -o     type: outfile
            desc: resulting output image

OPTIONAL ARGUMENTS
     none

EXAMPLES
SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lmat2viff(3)

RESTRICTIONS
COPYRIGHT
     Copyright 1991, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

