- function [y] = rjGaussian(mu,x);
- %
- if nargin < 2, error('Not enough input arguments.'); end
- [N,d] = size(x); % N = number of data, d = dimension of x.
- y=zeros(N,1);
- for j=1:N,
- z=norm(x(j,:)-mu(1,:)); % Euclidean distance.
- y(j,1)=exp(-(16*16)*z.^(2)); % Gaussian with fixed width for exp. 1.
- % y(j,1)=exp(-(0.5)*inv(.00001)*z.^(2)); % Gaussian.
- end;