A computer-implemented method for evaluating the quality of at least one periodic or quasi-periodic physiological signal, in particular a signal which is representative of a heart rate of a subject or modulated by a heart rate of a subject, said method comprising: - segmenting the physiological signal temporally into a plurality of signal segments ( T i,m; P i), said signal segments ( T i,m) having all the same temporal length ( m) selected to be higher than or equal to the predefined longest period of the physiological signal, - transforming the physiological signal using a transformation function, e.g. the square root velocity function SRVF, so that the distance representative of a shape difference between two signal segments ( T i,m, T j,m) is given by the Euclidean distance between the transformed representations of the two signal segments; - for each given signal segment ( T i,m; P i), determining a distance (d) representative of a shape difference between the given signal segment ( T i,m; P i) and at least one signal segment ( T i,m; P ref) temporally offset relative to the given signal segment, - computing a sliding distance matrix ( sdm) by calculating, for the transformed representation of each given signal segment (T i,m) starting at a point ( i) and of duration ( m), the distance to all signal segments (T j,m) starting at a point ( j) and of duration ( m) comprised in a temporal window ( φ) around ( T i,m) of length ( n) between twice and ten times the length ( m), wherein said sliding distance matrix ( sdm) has cells ( i, j) comprising the distance between segments ( T i,m) and ( T j,m); - for each column ( T i) of the sliding distance matrix (sdm), computing the minimum distance value of each column, yielding a so-called sliding matrix profile consisting of a vector of the minimal distance between the transformed representation of each given signal segment ( T i,m) to all the transformed representation of signal segments ( T j,m) in a temporal window (φ) around the given signal segment ( T i,m) having a length ( n) between twice and ten times the length ( m) of the signal segment, so that the sliding matrix profile vector comprises the distance ( d) representative of a shape difference for each given signal segment ( T i,m; P i); - determining a quality index ( q) of the given signal segment ( T i,m; P i) according to the distance ( d) determined for the given signal segment. - segmenting the physiological signal temporally into a plurality of signal segments ( T i,m; P i), said signal segments ( T i,m) having all the same temporal length ( m) selected to be higher than or equal to the predefined longest period of the physiological signal, - transforming the physiological signal using a transformation function, e.g. the square root velocity function SRVF, so that the distance representative of a shape difference between two signal segments ( T i,m, T j,m) is given by the Euclidean distance between the transformed representations of the two signal segments; - for each given signal segment ( T i,m; P i), determining a distance (d) representative of a shape difference between the given signal segment ( T i,m; P i) and at least one signal segment ( T i,m; P ref) temporally offset relative to the given signal segment, - computing a sliding distance matrix ( sdm) by calculating, for the transformed representation of each given signal segment (T i,m) starting at a point ( i) and of duration ( m), the distance to all signal segments (T j,m) starting at a point ( j) and of duration ( m) comprised in a temporal window ( φ) around ( T i,m) of length ( n) between twice and ten times the length ( m), wherein said sliding distance matrix ( sdm) has cells ( i, j) comprising the distance between segments ( T i,m) and ( T j,m); - for each column ( T i) of the sliding distance matrix (sdm), computing the minimum distance value of each column, yielding a so-called sliding matrix profile consisting of a vector of the minimal distance between the transformed representation of each given signal segment ( T i,m) to all the transformed representation of signal segments ( T j,m) in a temporal window (φ) around the given signal segment ( T i,m) having a length ( n) between twice and ten times the length ( m) of the signal segment, so that the sliding matrix profile vector comprises the distance ( d) representative of a shape difference for each given signal segment ( T i,m; P i); - determining a quality index ( q) of the given signal segment ( T i,m; P i) according to the distance ( d) determined for the given signal segment.