Euklid (Inverse) Distance Weight Matrix

版本 1.0.0.0 (2.0 KB) 作者: Felix Hebeler
Calculates a weight matrix of any size using the (inverse) euklidean distance from center cell.
2.5K 次下载
更新时间 2007/1/23

无许可证

function W = euklid_W(ws,d,n)
function W = euklid_invW(ws,d,n)
% PURPOSE: create an (inverse) euklidean distance spatial weight matrix
% (n x m 'moving-window' style matrix with distance to center cell
% weighted.)
% ------------------------------------------------------------------
% USAGE: W = euklid_W([wsy wsx],[dy dx],n)
% where: ws is a vector [wsy wsx] of the x and y size of the matrix (uneven!)
% d (optional) is a vector [dy dx] of the cellspacing in y and x direction
% (default 1)
% [n] (optional) specifies how to normalize the weight matrix.
% Options for [n] are:
% 1) 'norm' to create a normalized weight matrix (sum of all
% weights is 1
% 2) 'none' or NA for a non-normalized matrix (default)
% -------------------------------------------------------------------------
% OUTPUTS:
% [W] a matrix with weights for every cell except center.
% -------------------------------------------------------------------
% NOTES: Weights are the the euklidean distance to
% the center cell. Center cell weight is zero.

引用格式

Felix Hebeler (2024). Euklid (Inverse) Distance Weight Matrix (https://www.mathworks.com/matlabcentral/fileexchange/13665-euklid-inverse-distance-weight-matrix), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2006a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Map Display 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Update m files so different cellsizes in X and Y direction are supported.