Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
probml
GitHub Repository: probml/pyprobml
Path: blob/master/notebooks/book2/12/rjmcmc_rbf/rjCubic.m
1193 views
1
function [y] = rjGaussian(mu,x);
2
% PURPOSE : Gaussian basis function.
3
% INPUTS : - mu: The basis centre.
4
% - x: The evaluation point in the domain.
5
% OUTPUTS : - y: The value of the Gaussian at x.
6
% AUTHOR : Nando de Freitas - Thanks for the acknowledgement :-)
7
% DATE : 21-01-99
8
9
if nargin < 2, error('Not enough input arguments.'); end
10
11
[N,d] = size(x); % N = number of data, d = dimension of x.
12
y=zeros(N,1);
13
for j=1:N,
14
z=norm(x(j,:)-mu(1,:)); % Euclidean distance.
15
y(j,1)= z.^(3); % Cubic spline.
16
end;
17
18
19
20
21
22
23
24
25
26