A medical device comprising at least one sensor for acquiring and sampling a biological signal, an evaluation unit connected to said sensor, said biological signal representing a signal waveform and forming a waveform vector composed of said biological signal samples, and a memory for storing a least two threshold vectors composed of boundary samples representing at least two boundaries related to said biological signal defining subspaces for biological signal samples. The one threshold vector is an upper threshold vector composed of upper boundary samples and the other threshold vector is a lower threshold vector composed of lower boundary samples, wherein each lower boundary sample is less than or equal to the corresponding upper boundary sample. The evaluation unit is adapted to determine a similarity index (ASCI) by trichotomizing said waveform vector by comparing each of said biological signal samples of said waveform vector to corresponding boundary samples of said threshold vectors, thus determining to which subspace each biological signal sample belongs to and creating a trichotomized signal vector, and calculating the signed correlation product of two trichotomized signal vectors.