⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rbf_dot (1).m

📁 关于人脸识别的一个VC程序
💻 M
字号:
function dpt = rbf_dot(data1, data2, sigma2)
%RBF_DOT Compute dot product table 
%	rbf_dot2(data1, data2)
%	the first argument is required, the second one is optional
% 	if only one argument is passed it computes the dpt with data2 = data1
% 	otherwise k(data1(i), data2(j)) is computed
%       exp(-||x - y||^2/SIGMA2)
%	SIGMA2 is a global variable is used when the third parameter
%       isnot given 
%	data entries in data1 and data2 per row, i.e. number of rows is number
% 	of samples
global SIGMA2

%#realonly
%#inbounds

if nargin<3, sigma2=SIGMA2 ; end ;
if isempty(sigma2),
	error('global variable SIGMA2 not set or input parameter sigma2 not defined.') ;
end ;

v=version ;
if v(1)~='5', func='rbf_dot_c4' ; else func='rbf_dot_c5' ; end ;

%tic;
%fprintf(1, '\ncomputing rbf_dot: %i x %i ... ', size(data1,2), size(data2,2)) ;
if nargin>1,
  dpt=feval(func, data1, data2, sigma2) ;
else
  data2=data1 ;
  dpt=feval(func, data1, data1, sigma2) ;
end ;	

%global SIGMA2
%SIGMA2=sigma2 ;
%dpt1=rbf_dot1(data1, data2) ;
%dpt
%dpt1
%dnorm=norm(dpt1-dpt,'fro')/norm(dpt1,'fro')
%pause

%fprintf(1, 'Done.\n') ;
%toc;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -