hello angelo,

i would say that the definitions of diagonal and vertical lines in a RP are quite clear and well explained in several publications, e.g., in

N. Marwan, M. C. Romano, M. Thiel, J. Kurths: Recurrence Plots for the Analysis of Complex Systems, Physics Reports, 438(5-6), 237-329, DOI:10.1016/j.physrep.2006.11.001

simply speaking a diagonal line are

connected points in a RP in diagonal direction, i.e., R_(i,i+j) = 1 for i=a,...,b.

your other question about the clusters is not really clear to me. are you asking to just remove the main diagonal?

best regards

norbert

PS: here is some example code how to fill a histogram of lengths of diagonal lines. here the histogram counts each diagonal line as two lines as finally i consider the entire RP (lower and upper triangle of the matrix) but the implementation considers only the lower triangle (and assumes that the RP is symmetric).

- Code: Select all
`for ( i = 0; i < size; i++ ) { /* for each point */`

counterL = 0;

for ( j = 0; j < size-i; j++ ) { /* look in diagonal direction */

/* compute the distance between the phase space points */

d = distance( dataPtr + cols * (i+j), dataPtr + cols * j );

/* check whether we have recurrence point */

if ( d < e && j < size-i) {

/* consider only RP outside the Theiler window */

if(i >= theilerCorr) ++counterL; /* counter for diagonal lines */

} else {

if (counterL > 0 && counterL < size) histL[counterL] += 2;

counterL = 0;

}

}

if (counterL > 0 && counterL < size) { histL[counterL] += 2; counterL = 0; }

if (counterL > 0 && counterL == size) { histL[counterL] += 1; counterL = 0; }

}