Hello,
I'm analysing a signal where outliers are not uncommon. So the main
loop
contains a number of test like
sum(x(indi-(1:4)) >= 0) >= 2 && sum(x(indi+(1:4)) <= 2) >= 2,
I tried to optimise x and indi as int16, so the types are
x(indi-(1:4)) vector of int16
x(indi-(1:4)) >= 0 vector of logical
sum(x(indi-(1:4)) >= 0) double
Is there a way to avoid, in the last operation, the logical -> double
conversion ? any() doesn't fit the requirement, as it test for one
value. I
thinked about
sort(x(indi-(1:4)) >= 0))(3) == 1
But this implies to call sort at each test. Does someone see a faster
solution ? I'm working with octave3.2
Regards
Pascal