function answer = RBFGaussKernelFunc(x, c, sigema)
% param : x 表示要求的RBF核距离的向量
% param : c 表示RBF函数的样本中心向量
% param : sigema 表示Kernel函数需要的参数 K(x,y) = exp(-||x-y||^2 /sigema^2)
% function : 该函数的功能是实现对x向量求RBF距离
% CopyRight : edu.nust.cs726.JunH(111060881)
[xh xl] = size(x);
[ch cl] = size(c);
if xh~=ch || xl~=cl
error('the x vector is not the same size with c vector!');
end
if 1==xh
Odis2 = (x-c)*(x-c)';
elseif 1==xl
Odis2 = (x-c)'*(x-c);
else
error('x c is not vector');
end
answer = exp(- Odis2 / (sigema*sigema));
% param : x 表示要求的RBF核距离的向量
% param : c 表示RBF函数的样本中心向量
% param : sigema 表示Kernel函数需要的参数 K(x,y) = exp(-||x-y||^2 /sigema^2)
% function : 该函数的功能是实现对x向量求RBF距离
% CopyRight : edu.nust.cs726.JunH(111060881)
[xh xl] = size(x);
[ch cl] = size(c);
if xh~=ch || xl~=cl
error('the x vector is not the same size with c vector!');
end
if 1==xh
Odis2 = (x-c)*(x-c)';
elseif 1==xl
Odis2 = (x-c)'*(x-c);
else
error('x c is not vector');
end
answer = exp(- Odis2 / (sigema*sigema));