View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

3.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 8.28 KB File ID: #27526 Version: 1.3




07 May 2010 (Updated )

Creates an inverse-distance SWM, from X and Y coords.Can be used on very large datasets

| Watch this File

File Information

Uses x,y coordinates to produce distance-based spatial weight matrices useful for spatial econometric regressions. The user is asked to input x and y coordinates, as well as a lower and upper bound threshold for the neighborhood.
The code is adapted from a previous version by Shawn Bucholtz of the USDA. A correction is made to set the (i,i) th elements (the diagonals) equal to zero.
Unlike other similar programs, this one can be used on very large datasets.


This file inspired Inverse And Determinant Of Square Matrix.

MATLAB release MATLAB 7.6 (R2008a)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
05 Feb 2015 Patrick Walsh

If you re-download the file it has now been updated with normbig inside it, so it should work. Check out my other files for alternate types of SWM files. Let me know if you have any questions!

Comment only
05 Feb 2015 Patrick Walsh

Vania, sorry about that. Ill update the file to have that nested inside. In the meantime, here it is

Comment only
04 Feb 2015 Vania Salas

Hi, I am trying to run this file but I am having a problem with this line SW=sparse(normbig(SW)) It seems that normbig is not a recognized function and I am trying to find it but without success. Can anybody help me, please?

Comment only
03 Apr 2012 Bumseok

08 May 2012 1.1

Some minor updates, should make code run better.

02 Jan 2013 1.2

Updated to include other required programs.

05 Feb 2015 1.3

Updated to include normbig file

Contact us