Understanding Array Labels
When you define a vector A one-dimensional array. or a matrix A two-dimensional array., it must be defined relative to a particular set of array labels A collection of labels identifying the items of an array.. A set of array A collection of variables that share common output attributes and can be manipulated in GoldSim elements or input expressions. labels is simply a collection of labels for the items of the array. The labels can be numbers (1, 2, ..., 10) or words (apples, oranges, peaches, pears). When you define an element which has an array as an output, you must specify the sets of array labels upon which the array is based.
You define and reference a particular item of an array by using these labels. Vectors require a single set of array labels, and matrices require two sets of array labels (one for the rows, one for the columns).
As an example, consider a matrix that represents the salmon population in each of a number of streams over a period of 3 years:
The matrix is defined relative to two sets of array labels: the rows are labeled using a "stream" set, and the columns are labeled using a "year" set. The labels or members for the "stream" set are BearCreek, IssaquahCreek, BlackRiver, and so on. The labels for the "year" set are the numbers 1998, 1999, and 2000.
You would reference the (scalar An output consisting of a single value or condition.) item in the third row and second column of the matrix as Salmon_Population[BlackRiver, 1999].
Learn more
- Array Functions
- Copying Array Elements Between Models
- Defining Arrays in an Input Field Using Array Constructor Functions
- Defining Vectors and Matrices Using Data Elements
- Defining Vectors Using Stochastic Elements
- Displaying Final Value Results for Matrices
- Displaying Final Value Results for Vectors
- Elements That Can Manipulate Arrays
- Manipulating Vectors and Matrices with Other Elements
- Referencing an Item of an Array
- Understanding Array Labels
- Using a Vector as a Lookup Table
- Viewing an Array in a Browser or Interface
- Viewing Array Results
- Viewing Results for Arrays
- Viewing Time Histories for Array Outputs
- Viewing Time Histories of Multiple Realizations for an Array