Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

matrix_print
Summary

int matrix_print(A,m,n,rlab,clab,lr,lc,
                 m2,n2,mv,nv,form,width,editline,outfile,header)
double *A;        /* matrix */
int m,n;          /* # of rows and columns */
char *rlab,*clab; /* row and column labels */
int lr,lc;        /* lengths of row and col. labels */
int m2,n2;        /* # of selected rows/cols */
int *mv,*nv;      /* lists of selected rows/cols */
char *form;       /* format as 123.12 or %5.5g  */
int width;        /* entire printing width */
int editline;     /* first edit line for the output */
char *outfile;    /* output file/device */
char *header;     /* header text */
Description

The matrix_print function writes an m*n matrix A or an m2*n2 submatrix of it in the current edit field and/or appends the same text in a text file outfile. The matrix is written in blocks of maximal width of width characters. Each block will be labelled with appropriate row and column labels. The first output line will be header.

If m2=m, n2=n and mv=nv=NULL, the entire A matrix will be written.
If m2<=m, n2<=n and mv=nv=NULL, the m2 first rows and n2 first columns of A will be written.
If mv is not NULL, rows mv[0],mv[1],...,mv[m2-1] (with possible values from 0 to m-1) are written in this order.
If nv is not NULL, columns nv[0],nv[1],...,nv[m2-1] (with possible values from 0 to n-1) are written in this order.
Return Value

matrix_print always returns 1.

See Also

matrix_load, matrix_format, library SURVOMAT.LIB


Front page of Survo C libraries