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

📄 rescale.m

📁 Non-parametric density estimation
💻 M
字号:
function npd = rescale(npd,factor)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% rescale(P, factor) --  Rescales the KDE "P" proportionally by 
%                           "factor" (a column-vector)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Copyright (C) 2003 Alexander Ihler; distributable under GPL -- see README.txt

N = npd.N;
npd.centers    = npd.centers .* repmat(factor,[1,2*N]);
npd.ranges     = npd.ranges .* max(factor);  % to be safe
npd.means      = npd.means .* repmat(factor,[1,2*N]);
npd.bandwidth     = npd.bandwidth .* repmat(factor.^2,size(npd.bandwidth)./size(factor));

⌨️ 快捷键说明

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