Generate AR1 spatial data

버전 1.0.0.0 (4.46 KB) 작성자: Jon Yearsley
Generates spatial data using an AR1 process with normal error distribution.
다운로드 수: 1.7K
업데이트 날짜: 2016/3/31

라이선스 보기

This script generates artificial spatial data using a first order spatial autoregressive process (AR1)
The process is
X(i,j) = PHI*(X(i,j-1)+X(i,j+1)+X(i-1,j)+X(i+1,j) + error

To generate a 10x10, periodic spatial pattern, with normal error distribution, and a variance of SIGMA, the command is

spatialPatternAR1([10,10],PHI,SIGMA)

or equivalently,
spatialPatternAR1([10,10],PHI,SIGMA,1)

the same pattern, but with a rigid boundary is generated with

spatialPatternAR1([10,10],PHI,SIGMA,0)

Different error distributions can be used. Using the current script this can be done by extracting the generator matrix, M

M = spatialPatternAR1([10,10],PHI,SIGMA,1,1)

M is a 100x100 matrix.
Then given a random vector, error (size = 100x1) with indepedent elements sampled from the required error distribution, the spatial pattern is given by

x = reshape(M * error,[10,10])

인용 양식

Jon Yearsley (2024). Generate AR1 spatial data (https://www.mathworks.com/matlabcentral/fileexchange/5099-generate-ar1-spatial-data), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Multivariate Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

버전 게시됨 릴리스 정보
1.0.0.0

Update for BSD License