## doc: gp_dist

Canonical GP distance

### Syntax

D2 = gp_dist(Kuv, Ktu, Ktv, dKuu, dKvv, BayesInv)
D2 = gp_dist(Kuv, Ktu, Ktv, dKuu, dKvv, BayesInv, Ht, Hu, Hv)

### Arguments

*Kuv* kernel matrix *(nu, nv)* between the points of *U* and *V**Ktu* kernel matrix *(nt, nu)* between the points of *Xt* and *U**Ktv* kernel matrix *(nt, nv)* between the points of *Xt* and *V**dKuu* vector *(nu, 1)* of the diagonal kernel between the points of *U**dKvv* vector *(nv, 1)* of the diagonal kernel between the points of *V**BayesInv* struct array as returned by *gp_inf(Ht, Ktt, Yt, noise)**Ht* matrix *(nt, b)* basis for the points of *Xt**Hu* matrix *(nu, b)* basis for the points of *U**Hv* matrix *(nv, b)* basis for the points of *V*

### Outputs

*D2* matrix *(nu, nv)* of squared distance between *U* and *V*

### See also

gp_pred