xy2cont_d3.m
来自「计量工具箱」· M 代码 · 共 25 行
M
25 行
% PURPOSE: An example of using xy2cont()
% to produce a sparse spatial weight matrix
% using a VERY large data set
%---------------------------------------------------
% USAGE: xy2cont_d3
%---------------------------------------------------
clear all;
% number of observations
n=100000;
% generate artificial locational coordinates
xcoord = sort(randn(n,1));
ycoord = sort(randn(n,1));
% create contiguity matrix (1st order)
disp('time taken to produce W-matrix, 100,000 observations');
disp('patience ...');
tic;
[junk W junk] = xy2cont(xcoord,ycoord);
toc;
spy(W);
title('row-stochastic weight matrix 100,000 observations');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?