marginal.m

来自「Non-parametric density estimation」· M 代码 · 共 18 行

M
18
字号
function p = marginal(dens,ind)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% p = marginal(p2,ind) -- find the marginal of a kde on the given indices%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (C) 2003 Alexander Ihler; distributable under GPL -- see README.txt  pts = getPoints(dens);  if (size(dens.bandwidth,2) > 2*dens.N)    sig = getBW(dens,1:getNpts(dens));   % Many different BWs?  else                                   % Or all BWs the same    sig = getBW(dens,1);  end;  wts = getWeights(dens);  p = kde(pts(ind,:),sig(ind,:),wts,getType(dens));

⌨️ 快捷键说明

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