# Arrays

## Models Illustrating the Use of Arrays

All the models assigned to the selected category are listed below.

You can filter the list by entering keywords or phrases into the search field:

• #### Finding Vector Min and Max

This model demonstrates how you can create a Boolean vector identifying the location of the minimum or maximum items in a vector of values.

• #### Add Scalar to Vector

This model demonstrates how you can take a scalar value and add it to one of the items of a vector using an Expression. It includes an illustrative Dashboard.

• #### Random Sequence Generation

This model addresses the need to randomly order a given number of indexed items

• #### Vector and Matrix Constructors

This model demonstrates the various ways in which array constructors can be used to construct vectors or matrices from different inputs.

• #### Append Vector to Matrix

Example model illustrating adding a vector to an existing matrix

• #### Monthly and Annual Summaries

This model integrates (accumulates) a scalar daily signal over a period of 5 years and returns monthly and annual sums.

• #### Median Function

Methods to calculate the median of an array or time series are illustrated using Script elements and Function elements.

• #### Rank Data Vector

Take any vector of values and rank them according to their respective value from highest to lowest or the opposite.

• #### Annual Reporting Summaries

This model shows how scalar and vector daily signals can be integrated to obtain annual sums stored in a vector or matrix format.

• #### Monthly Reporting Summaries

This model shows how a vector daily signal can be integrated to obtain monthly sums stored in a matrix format.

• #### Matrix / Vector Conversions

This model illustrates how to load values from a matrix into a vector and from a vector into a matrix. This can be done using GoldSim's vector and matrix constructors.

• #### Monthly Cumulative Flows

This example shows how to use a vector constructor to generate a vector of month flow rates for integration and other calculations

• #### Check Boxes in a Dashboard

This model illustrates how you can add Select All and Select None functionality to check boxes in a GoldSim Dashboard.

• #### Vector Type Splitter Element

Use a Script element to replace the Splitter element for vector input types

• #### Vector Type Allocator Element

Use a Script element to replace the Allocator element for vector input types

• #### Gauss-Newton Trend Line Fitting

This model illustrates how to fit a trend line to data using the Gauss-Newton method.

• #### Vector Distributions

This example shows how a vector of sampled values can be generated from a single distribution definition for Sampled, Cumulative and Discrete stochastics

• #### Defining Vector Distributions

This example shows how to define and sample vector discrete and cumulative distributions using (1) a vector uniform 0-1 stochastic to sample probability levels and (2) a script element to get the corresponding values.

• #### Time History Statistics

This model provides examples of two different methods which can be used to generate statistics for time histories.

• #### Probability Mass Function (PMF)

This model creates a histogram from time series values and uses it to create a PMF of the data.

• #### Multiple Catchment Runoff

Watershed runoff is calculated for three catchments using the same function but different inputs

• #### Forecasted Water Demand

Calculate future, monthly water demands based on current usage and an annual projection