Mat Print Command

Purpose

Prints the elements of an array to screen or a channel.

Syntax

Mat Print [#i,]a()[, g, n]

a():name of a floating point array
i, g, n:integer expression

Description

Mat Print [#i,]a()[,g,n] prints a floating point array to screen. One-dimensional floating point arrays are printed on one line with individual elements separated by commas; for two-dimensional arrays a line feed is performed after each row. Similar to the Print command, the output can optionally be redirected to a file using #i. g and n cause the formatting of the numbers similar to Str$(x,g,n).

Example

OpenW # 1

Data 1,2.33333,3

Data 7,5.25873,9.376

Data 3.23,7.2,8.999

Global Double a(1 To 3, 1 To 3)

Mat Read a()

Mat Print a()

Print

Mat Print a(), 5, 3

Print

Mat Print a(), 6, 3

Known Issues

If the array passed to Mat Print is not Single or Double, then an Array Dimension error is raised.

See Also

Mat Read

{Created by Sjouke Hamstra; Last updated: 15/02/2023 by James Gaite}