User guide

15 Working with Arrays
15.1 Initializing Arrays
TheuseofN-dimensionalarraysinGAUSSisanadditionaltoolforreducingdevel-
opmenttimeandincreasingexecutionspeedofprograms.Therearemultiplewaysof
handlingN-dimensionalarraysandusingthemtosolveproblems,andthesewayssome-
timeshaveimplicationsforatrade-offbetweenspeedofexecutionanddevelopment
time.Wewilltrytomakethisclearinthischapter.
Theterm''arrays''specificallyreferstoN-dimensionalarraysandmustnotbeconfused
withmatrices.Matricesandarraysaredistincttypesevenifinfacttheycontainiden-
ticalinformation.Functionsforconversionfromonetotheotheraredescribedbelow.
Therearefivebasicwaysofcreatinganarraydependingonhowthecontentsarespec-
ified:
areshape
Createarrayfromspecifiedmatrix.
aconcat
Createarrayfrommatricesandarrays.
aeye
Createarrayofidentitymatrices.
arrayinit
Allocatearrayfilledwithspecifiedscalarvalue.
arrayalloc
Allocatearraywithnospecifiedcontents.
15-1