Interpolate field using nearest neighbors
Interpolates a square input matrix to a finer
resolution ns
using nearest neighbours.
interpola(z, ns)
z |
matrix containing the input field at coarse resolution. |
ns |
the target size. |
The resulting fine-scale field with dimensions c(ns, ns)
.
Jost von Hardenberg, j.vonhardenberg@isac.cnr.it
za <- rnorm(4 * 4) dim(za) <- c(4, 4) z <- interpola(za, 16) dim(z) # [1] 16 16
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.