В MATLAB легко найти индексы значений, которые удовлетворяют конкретному условию:
>> a = [1,2,3,1,2,3,1,2,3];
>> find(a > 2) % find the indecies where this condition is true
[3, 6, 9] % (MATLAB uses 1-based indexing)
>> a(find(a > 2)) % get the values at those l...
11 май 2011, в 01:01