A method of analysing biomedical signals, for example electrocardiograms, by using a Hidden Markov Model for subsections of the signal. In the case of an electrocardiogram two Hidden Markov Models are used to detect respectively the start and end of the QT interval. The relationship between the QT interval and heart rate can be computed and a contemporaneous value for the slope of this relationship can be obtained by calculating the QT/RR relationship for all of the beats in a sliding time window based on the current beat. Portions of electrocardiograms taken on different days can efficiently and accurately be compared by selecting time windows of the ECGs at the same time of day, and looking for similar beats in those time windows.