CRP Toolbox Reference

## fnn

### Purpose

Find the optimal embedding dimension by means of false nearest neighbours.

### Syntax

y=fnn(x)
y=fnn(x,m)
y=fnn(x,m,t)
y=fnn(x,m,t,r,s)
fnn(...)
fnn(...,param)

### Description

y=fnn(x) computes the vector y of the amount of false nearest neighbours (FNN) as a function of the embedding dimension.

y=fnn(x,m), where m is a scalar, computes the FNN up to dimension m. The defeault is m=10.

y=fnn(x,m,t), where t is a scalar, computes the FNN using embedding delay t. The defeault is t=1.

y=fnn(x,m,t,r,s), where r and s are scalars, applies the neighbourhood criterion r and the size of the neighbourhood s. the defeault is r=2 and s=Inf.

y=fnn(x,m,t,r,s,n), where n is a scalar, uses n random samples for the determination of the FNNs. This speeds up the estimation, especially for long data series. The default is n=length(x) if the data length is smaller than 500, else n=200.

fnn(...) without any output arguments opens a GUI for interactively changing the parameters.

By using the GUI, the FNNs can be stored into the workspace.

fnn without any arguments calls a demo (the same as the example below).

 Additional parameters according to the GUI. 'gui' - Creates the GUI. 'nogui' - Suppresses the GUI. 'silent' - Suppresses all output.

### Examples

x=sin(0:.2:8*pi)'+.1*randn(126,1);
fnn(x,10,[],5)