Language Reference


TYPE Function

TYPE (matrix);

The TYPE function returns a single character value that represents the type of a matrix. The value is 'N' if the type of the matrix is numeric; it is 'C' if the type of the matrix is character; it is 'U' if the matrix does not have a value.

The following statements determine the type for three different matrices:

cMat = {"Rick" "Nancy"};
t1 = type(cMat);
nMat = {3.14159 2.71828};
t2 = type(nMat);
free uMat;
t3 = type(uMat);
print t1 t2 t3;

Figure 24.415: The Types of Matrices

t1 t2 t3
C N U