MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

>,>=,<,<=,==,!= — Boolean operators [mathematica]

(v>w)

(v>=w)

(v<w)

(v<=w)

(v==w)

(v!=w)

v, w: expressions

The Boolean binary operator > can be used in the anims and insignals components of a call to MotionOutput to represent a conditional expression whose value equals 1 if the left argument is greater than the right argument and 0 otherwise.

The Boolean binary operator >= can be used in the anims and insignals components of a call to MotionOutput to represent a conditional expression whose value equals 1 if the left argument is greater than or equal to the right argument and 0 otherwise.

The Boolean binary operator < can be used in the anims and insignals components of a call to MotionOutput to represent a conditional expression whose value equals 1 if the left argument is less than the right argument and 0 otherwise.

The Boolean binary operator <= can be used in the anims and insignals components of a call to MotionOutput to represent a conditional expression whose value equals 1 if the left argument is less than or equal to the right argument and 0 otherwise.

The Boolean binary operator == can be used in the anims and insignals components of a call to MotionOutput to represent a conditional expression whose value equals 1 if the left argument equals the right argument and 0 otherwise.

The Boolean binary operator != can be used in the anims and insignals components of a call to MotionOutput to represent a conditional expression whose value equals 1 if the left argument differs from the right argument and 0 otherwise.

The Boolean operators are implemented as functions. It follows that the expression v>w is equivalent to `>`(v,w). Since function evaluation has higher priority than arithmetic operations, parentheses must be used to delimit the arguments of the Boolean operators.

v>3

v > 3

2+v>3

2 + v > 3

(2+v)>3

2 + v > 3

SetTime[t];
MotionOutput["ode"->{},"anims"->{k->(Sin[2*PI*t]>=0),On->(n1^2+n2^2+n3^2!=0)}]
   time t;
anims {
k = sin(2.*PI*t)>=0;
On = n1^2+n2^2+n3^2!=0.;
}


Toolbox functions