R/build.lap.r

Defines functions build.lap

Documented in build.lap

##########################################
## ---- BUILD Five Point Laplacian ---- ##
##########################################

build.lap <- function(xdim,ydim) { 
    lap <- matrix(0, xdim, ydim)
    lap.mid.x <- ceiling(nrow(lap)/2)
    lap.mid.y <- ceiling(ncol(lap)/2)
    lap[(lap.mid.x - 1):(lap.mid.x + 1), (lap.mid.y - 1):(lap.mid.y + 1)] = c(0, 1, 0, 1, -4, 1, 0, 1, 0)

    return(lap)
}

Try the imagefx package in your browser

Any scripts or data that you put into this service are public.

imagefx documentation built on Feb. 14, 2020, 1:07 a.m.