functionSumCondition
Conditional sum and share
Information
Returns the sum of entries of a vector and their share if a condition is true.
Inputs:
- Vector
- Condition (vector with boolean values)
- Dimension (dimension of vectors)
Output:
- Sum of vector elements where condition is true
- Share of vector elements where condition is true
- September 27, 2016, by Moritz Lauster:
Moved to fit to new Annex60 structure. - February 26, 2016, by Moritz Lauster:
Added share of volume for each zone as output. - October 30, 2015, by Moritz Lauster:
Moved and adapted to AixLib. - March 7, 2014, by Ole Odendahl:
Added documentation and formatted appropriately
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[dimension] | vector | Input vector | |
| Boolean[dimension] | condition | Vector of conditions | |
| Integer | dimension | Dimension of inputs |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | vectorSum | 0 | Sum of vector elements where condition is true |
| Real[dimension] | vectorShare | Share of vector elements where condition is true, entries with conditon is false are set to zero |