Language Reference

NUM Function

produces a numeric representation of a character matrix

NUM( matrix)

where matrix is a character matrix or a quoted literal.

The NUM function takes as an argument a character matrix with elements that are character numerics; and produces a numeric matrix with dimensions that are the same as the dimensions of the argument and with elements that are the numeric representations (double-precision floating-point) of the corresponding elements of the argument.

An example that uses the NUM function follows:

    c={'1' '2' '3'}; 
            C        1 row       3 cols    (character, size 1) 
                                1 2 3 
            J        1 row       3 cols    (numeric) 
                        1         2         3
See also the description of the CHAR function, which does the reverse conversion.

Previous Page | Next Page | Top of Page