blockIntegerVectorFilter

Filter an integer vector based on a boolean mask

Information

This block filters a Integer vector of size nin to a vector of size nout given a Boolean mask msk.

If an entry in msk is true, then the value of this input will be sent to the output y, otherwise it will be discarded.

The parameter msk must have exactly nout entries set to true, otherwise an error message is issued.

Parameters

TypeNameDefaultDescription
IntegerninSize of input vector
IntegernoutSize of output vector
Boolean[nin]mskfill(true, nin)Array mask

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nin]uInput signals from which values are extracted
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput[nout]yOutput with extracted input signals

Revisions

  • June 22, 2021, by Baptiste Ravache:
    First implementation