functionSumCondition

Conditional sum and share

Information

Returns the sum of entries of a vector and their share if a condition is true.

Inputs:

  1. Vector
  2. Condition (vector with boolean values)
  3. Dimension (dimension of vectors)

Output:

  1. Sum of vector elements where condition is true
  2. 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

TypeNameDefaultDescription
Real[dimension]vectorInput vector
Boolean[dimension]conditionVector of conditions
IntegerdimensionDimension of inputs

Outputs

TypeNameDefaultDescription
RealvectorSum0Sum of vector elements where condition is true
Real[dimension]vectorShareShare of vector elements where condition is true, entries with conditon is false are set to zero