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

📄 xy2cont.m

📁 计量工具箱
💻 M
字号:
function [wswdel,wwsdel,wmatdel]=xy2cont(xc,yc)% PURPOSE: uses x,y coordinates to produce spatial contiguity weight matrices%          with delaunay routine from MATLAB version 5.2% ------------------------------------------------------% USAGE: [w1 w2 w3] = xy2cont(xcoord,ycoord)% where:     xcoord = x-direction coordinate%            ycoord = y-direction coordinate% ------------------------------------------------------% RETURNS: %          w1 = W*S*W, a symmetric spatial weight matrix (max(eig)=1)%          w2 = W*W*S, a row-stochastic spatial weight matrix, where S represents %               the adjacency matrix from Delaunay triangles (Voronoi tesselation).%          w3 = diagonal matrix with i,i equal to 1/sqrt(sum of ith row)% ------------------------------------------------------% References: Kelley Pace, Spatial Statistics Toolbox 2.0% ------------------------------------------------------% Written by Kelley Pace, 6/23/97 % revised on 12/25/02% (named fdelw2 in his spatial statistics toolbox)% Documentation modified by J. LeSage 11/2002if nargin ~= 2error('xy2cont: 2 input arguments required');end;% error checking on inputs[n junk] = size(xc);if junk ~= 1xc = xc';end;[n2 junk] = size(yc);if junk ~= 1yc = yc';end;if n ~= n2error('xy2cont: xc,yc inputs must be same size');end;[wswdel,wwsdel,wmatdel]=fdelw2(xc,yc);

⌨️ 快捷键说明

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