% f = rbftrain(X,Y,M,s,l) Train RBF to map f(X) = Y
%
% In:
%   X: NxL matrix, N L-dim data points rowwise.
%   Y: NxD matrix, N D-dim data points rowwise.
%   M: number of RBF centres.
%   s: nonnegative scalar, the RBF width.
%   l: nonnegative scalar, the regularisation parameter. Default: 0.
% Out:
%   f: (struct) the RBF, with fields:
%      type='rbf', centres C (MxL), width s, regularisation parameter l,
%      weights W (DxM), biases w (Dx1).

function f = rbftrain(X,Y,M,s,l)

