Hi guys,
why when I create [expr if($f1 < 50 && $f1 > 60, 0, 1)]
do I NOT get a zero for numbers up to 50 a 1 between 50 - 60 and a zero for sixty onwards. what am I doing wrong in [expr] ? a silly mistake I've made I imagine
cheers
Casper
expr if($f1 < 50 && $f1 > 60, 0, 1)
Hi guys,
why when I create [expr if($f1 < 50 && $f1 > 60, 0, 1)]
do I NOT get a zero for numbers up to 50 a 1 between 50 - 60 and a zero for sixty onwards. what am I doing wrong in [expr] ? a silly mistake I've made I imagine
cheers
Casper
@casper You ask for a zero if the input is below 50 and above 60 which is never true, so you only get a one.
What you probably want is [expr if($f1 > 50 && $f1 < 60, 1, 0)] or [expr if($f1 >= 50 && $f1 <= 60, 1, 0)].
You can also use "or" which is ||, so: [expr if($f1 < 50 || $f1 > 60, 0, 1)] or [expr if($f1 <= 50 || $f1 >= 60, 0, 1)].
Oops! Looks like something went wrong!