Mat Clr Command

Purpose

Sets all elements in a one- or two-dimensional floating point array to 0.

Syntax

Mat Clr a()

a():name of a one- or two-dimensional floating point (Double) array

Description

Mat Clr a() is equivalent to ArrayFill a(),0, that is to say the command sets all elements of array a() to 0.

Example

OpenW 1

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

Data 1,2,3,4,5,6,7,8,9

Mat Read a()

Mat Print a()

Print "--------"

Mat Clr a()

Mat Print a()

First it prints 1 to 9, and then all 0s.

See Also

ArrayFill, Mat Set, Mat One, Mat Neg

{Created by Sjouke Hamstra; Last updated: 14/10/2014 by James Gaite}