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

📄 kiss.m

📁 Lattice coding and decoding
💻 M
字号:
function varargout = kiss(latt,element)%KISS Lattice kissing number%   TAU = KISS(L,P) counts the kissing number in the particular %   element's P Voronoi region. In order to eliminate the finite lattice%   edge effects is better to use tracelatt function. This function%   counts the Voronoi cell parameters as well as the kissing number%   for all  lattice elements.%%   [TAU,SH] = KISS(L,P) also returns the kissing elements%   coordinates stored in SH matrix.%%   Note: KISS function gives sensible results only for geometrically%         uniform lattices.%%   See also TRACELATT, NBHOOD, SSHELL.%   Copyright 2001-2003 Kamil Anis, anisk@feld.cvut.cz%   Dept. of Radioelectronics, %   Faculty of Electrical Engineering%   Czech Technical University in Prague%   $Revision: 0.2 $  $Date: 2003/09/28 11:31:21 $%   --%   <additional stuff goes here>[npts,foo] = size(latt);ord = 1;thick = 1;coord = latt(element,:);center = repmat(coord,[npts 1]);dist = abs(latt - center);% find n-th smallest non-zero elementq = mapsto(dist,0,100);% row normsnn = dist .^ 2;nn = sum(nn,2);nn = nn .^ (1/2);nn = single(nn);% sort (unique) the shellsuu = unique(nn);rho_lo = uu(1 + ord);rho_hi = uu(ord + thick);pos = find((nn >= rho_lo) & (nn <= rho_hi));sh = latt(pos,:);tau = length(pos);varargout = {tau,sh}; 

⌨️ 快捷键说明

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