Conditional extraction of elements from the vector x.
Usage:
vsubc(x,c,s1)
vsubc(x,c,s1,s2)
Parameters:
x
The input vector.
c
The condition. The following values are supported:
0 - select all x[i] where x[i] < s1
1 - select all x[i] where x[i] > s1
2 - select all x[i] where s1 < x[i] < s2
s1
A real number. See c for details.
s2
A real number (only used if c==2). See c for details.
Result:
The result is a scalar or a vector with the selected elements from x.