CompareToConstant

This block compares its input with a constant parameter by way of a relational operator.

    CompareToConstant

Library

Activate/LogicalOperations

Description

The CompareToConstant block compares input with a constant by way of a relational operator, and produces a double output, 1 for true, and 0 for false.

Parameters

CompareToConstant_0

NameLabelDescriptionData TypeValid Values

op

Relational operator

Operator with which the input will be compared with a constant.

'=='
'~='
'<'
'<='
'>'
'>='

C

Constant

Constant used as the criterion for the comparison based on the relational operator.

zcr

Apply zero crossing

Turn this parameter on to detect the zero crossings. Default is off.

Number

0
1

externalActivation

External Activation

Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

input

1

Port 2

explicit

output

1

Port 3

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

yes

direct-feedthrough

yes

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no

See Also