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

📄 knn.m

📁 Non-parametric density estimation
💻 M
字号:
function [neighbors, distance] = knn(kde,points,k)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% [neighbors, distance] = knn(kde,points,k)
%
%    Find the k nearest neighbors to the point set 'points' (an Ndim x Npts
%       double array) within the kde.  The neighbors are returned as a set
%       of indices (neighbors); the optional second return value is the
%       distance to the k^th nearest neighbor.  Note that the
%       nearest neighbor of a point can include the point itself,
%       i.e. a point of distance 0.
%
% See also:  kde, getPoints
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

%#mex
error('MEX-file kde/knn not found -- please recompile if necessary');

⌨️ 快捷键说明

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