Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileMAT CLR a() MAT SET a()=x MAT ONE a() a: name of field with numeric variables x: aexp MAT CLR a() corresponds to ARRAYFILL a(),0, i.e. the command sets all elements in the field (matrix or vector) a() to a value of 0. MAT SET a()=x corresponds to an ARRAYFILL a(),x, i.e. the command sets all elements in the field (matrix or vector) a() to the value of x. MAT ONE a() generates from a square matrix a() a uniform matrix, i.e. a square martrix in which elements a(1,1), a(2,2), ..., a(n,n) are all equally 1 and all other elements equally 0. Examples: DATA 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 DIM a(3,3) MAT READ a() PRINT a(1,1) MAT CLR a() PRINT a(1,1) --> Outputs the value 1, then 0. DIM a(5,7) FOR i%=1 TO 5 FOR j%=1 TO 7 a(i%,j%)=RAND(10) NEXT j% NEXT i% MEAT SET a(),5.3 FOR i%=1 TO 5 FOR j%=1 TO 7 PRINT a(i%,j%) NEXT j% NEXT i% --> Outputs the value '3.5' 35 times. DIM a(3,3) MAT ONE a() MAT PRINT a() --> Outputs: 1,0,0 0,1,0 0,0,1