ECG-Kit 1.0

File: <base>/common/wavedet/buscamin.m (196 bytes)
function ind = buscamin(x);
% It searches the first minimum of the modulus of x.

x = abs(x);
localmin = (x(2:end-1)<=x(1:end-2))...
         & (x(2:end-1)<=x(3:end));

ind = min(find(localmin));