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

📄 loadwholekernel.m.svn-base

📁 a function inside machine learning
💻 SVN-BASE
字号:
function fileK = loadWholeKernel(X1Indices, X2Indices, kernelParams)
%Loads a kernel saved as a single variable from a file. 
%X1Indices indexes the rows, X2Indices indexes columns 
fileName = char(kernelParams.kernelFileName); 
kernelName = char(kernelParams.kernelName); 

fprintf('Loading kernel ... '); 
load(fileName, kernelName);
fprintf('... all done.\n'); 

renvar(kernelName, 'fileK'); 
numX1Examples = size(fileK, 1);
numX2Examples = size(fileK, 2);

%Check indices are within range 
if length(find(X1Indices > numX1Examples | X1Indices < 1))~= 0 
    error('X1Indices must between 1 and %d', numX1Examples); 
end 

if length(find(X2Indices > numX2Examples | X2Indices < 1))~= 0 
    error('X2Indices must between 1 and %d', numX2Examples); 
end 

fileK = fileK(X1Indices, X2Indices); 

⌨️ 快捷键说明

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