##
Homoclinic initialization (HHS)

For homoclinics the same problems occur as with limit cycles, a homoclinic continuation cannot be done by just calling the continuer as

> `[x,v,s,h,f]=cont(@homoclinic, x0, v0, opt)`

The homoclinic curve file has to know

- which ode file to use,
- which (two) system parameters are active,
- the values of all parameters,
- the number of mesh and collocation points to use for the discretization.

Also, some initial information about the state variables is necessary. In the simplest cases this is an initial cycle `x0` with a large period and close to a homoclic orbit, or an already known homoclinic orbit. This information can be supplied using an initializer:

- `[x0,v0]=init_LC_Hom(@odefile, x, s, p, ap, ntst, ncol, extravec, T, eps0, eps1)`
  Calculates an initial homoclinic orbit from a limit cycle with large period. Here `odefile` is the ode-file to be used. `x` and `s` are here the `x` and `s` belonging to the limit cycle with large period, obtained in a previous continuation. `p` is the vector containing the current values of the parameters. `ap` is the active parameter and `ntst` and `ncol` are the number of mesh and collocation points to be used for the discretization. `extravec` is a vector of 3 integers, which are either `0` or `1`, and which indicate which of `T, eps0, eps1` are to be variable during the continuation. The vector is `1` for those that should be variable. This can either be 1 or 2 or the three parameters. `T, eps0` and `eps1` are values for these parameters.

- `[x0,v0]=init_Hom_Hom(@odefile, x, s, p, ap, ntst, ncol, extravec, T, eps0, eps1)`
  Calculates an initial homoclinic orbit from a homoclinic orbit obtained during a previous continuation. All parameters are similar to the initialisations above.

These initializers return an initial homoclinic orbit `x0` as well as its tangent vector `v0`.

It is also possible to start a homoclinic orbit from a Bogdanov-Takens equilibrium point. The initialization of homoclinic orbits from a BT point has a long history. We refer in particular to [30], [31] and [1] where further references can be found. This case is relegated to the MATCONT GUI tutorials.

The homotopy method even allows a start from any equilibrium point. For details and examples we refer to [8]. This case is also relegated to the MATCONT GUI tutorials.