?? kiss.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 + -