Learn R Programming

spatialEco (version 0.1-5)

gaussian.kernel: Gaussian Kernel

Description

Creates a Gaussian Kernel of specified size and sigma

Usage

gaussian.kernel(sigma = 2, n = 5)

Arguments

sigma
sigma (standard deviation) of kernel (defaults 2)
n
size of symmetrical kernel (defaults to 5x5)

Value

matrix of gaussian distribution

References

Riley, S.J., S.D. DeGloria and R. Elliot (1999) A terrain ruggedness index that quantifies topographic heterogeneity, Intermountain Journal of Sciences 5(1-4):23-27.

Examples

Run this code
  par(mfrow=c(2,2))
  persp(gaussian.kernel(sigma=1, n=27), theta = 135, phi = 30, col = "grey", 
           ltheta = -120, shade = 0.6, border=NA )
  persp(gaussian.kernel(sigma=2, n=27), theta = 135, phi = 30, col = "grey", 
        ltheta = -120, shade = 0.6, border=NA )		
  persp(gaussian.kernel(sigma=3, n=27), theta = 135, phi = 30, col = "grey", 
        ltheta = -120, shade = 0.6, border=NA )				
  persp(gaussian.kernel(sigma=4, n=27), theta = 135, phi = 30, col = "grey", 
        ltheta = -120, shade = 0.6, border=NA )					
		

Run the code above in your browser using DataLab