Let me define first that: 'distance' is a vector (1 x n) and 'f' is a scalar (1 x 1). Example: distance = [1 10 5]; f = 2. The logical operator: distance > 2 would output: [0 1 1].
I want to say that if the output is NOT all zero, then do X. If the output is all zero, then do Y. How do I translate that to if-then statements?