#include "ltable.h"
FUNCTION put_matrix (vec,idtype,size,matrix)
struct VECTOR *vec; long idtype; struct MATRIX *size; unsigned char *matrix;
Pointer to a structure defining a field within an LT logical record. Note that a field is required to be a numerical matrix. Note that vecrecord.
Specifies the data type of parameter matrix. If the matrix is stored in the LT as a different data type, the matrix is converted to the specified data type. Note that data type conversion may lead to unexpected results when converting from a large data type (e.g., R*4) to a small data type (e.g., I*1). Valid data type values are:
= I1: unsigned byte data = I2: signed two byte data = I4: signed four byte data = R4: four byte floating point data = R8: eight byte floating point data
Number of rows and columns in the input matrix. If the input matrix size is smaller than the actual number of rows and columns in the LT, null fields will be written to the lower-right region of the matrix.
The matrix to be written into the LT. If required, the matrix is converted to the data type specified by the label vector.
The put_matrix() routine places a matrix into the LT. Writes an I*1, I*2, I*4, R*4, or R*8 matrix into the LT parameter vec array in row major. The data type of the input matrix is determined by parameter idtype
Note that parameter vec has a larger number of rows or columns, a fatal error is generated. If the matrix to be written has a smaller number of rows or columns, null values are written into the lower-right region of the matrix and a nonfatal error is output.
It is required that an application program call put_vector() prior to calling put_matrix().
put_matrix() has no return values.