This function creates a fixed amount of neighbours (FAN) matrix via console from a time series. To create a FAN matrix via interface, see the function createFAN.
getFANRM2(selTs, embedDim, lagDelay, threshold, theilerWin, fan)
A univarate time series in KarsTS format.
The embedding dimension.
The delay (in lags).
The threshold.
The Theiler's window (in lags).
The fixed amount of neighbours.
A list containing the X and Y positions of the recurrent points in the FAN recurrence matrix.
In case you do not want to embed your time series, set embedDim to 1 and lagDelay to 0. If you do not want to apply a Theiler's window, set theilerWin to 0. The threshold will determine in the first place the number of neighbors of each point; then, the fixed amount of neighbours will determine how many of those are kept. For example, if a point A has 10 neighbors (according to the threshold) and the fan is 5, the point A will have 5 neighbors in the output matrix. However, if a point B has only 4 neighbors (according to the threshold), the number of neighbors of B in the output matrix will be 4. If you want a matrix with a truly fixed amount of neighbors, give the threshold a value high enough to render it useless.
Marwan,R., Romano, M.C., Thiel,M., Kurths,J.(2007): Recurrence plots for the analysis of complex systems. Physics Reports 438, 237-329.