|
Essential Wavelets for Statistical Applications and Data Analysis R.T. Ogden, University of South Carolina 0-8176-3864-4 * 1996 * $40.00 * Hardcover * 285 pages * 40 Illustrations |
Fig5.12n <- function()
{
# postscript(file = "Fig5.12.ps", height = 5.46, width = 5.46, horiz = F)
par(mar = c(1.5, 1.5, 0, 0), mgp = c(5, 0.6, 0))
rs <- c(57, 14, 55, 51, 30, 0, 53, 44, 34, 53, 49, 2)
.Random.seed <- rs
x <- (1:1024)/1024
blocky <- fblocks(x)
sigma <- sqrt(var(blocky))/3
bnoise <- blocky + rnorm(1024, sd = sigma)
plot(wd(bnoise, filter.number = 5), main = "", sub = "")
# graphics.off()
NULL
}
fblocks <- function(x)
{
n <- length(x)
t <- c(0.1, 0.13, 0.15, 0.23, 0.25, 0.4, 0.44, 0.65, 0.76, 0.78, 0.81)
h <- c(4, -5, 3, -4, 5, -4.2, 2.1, 4.3, -3.1, 2.1, -4.2)
f <- rep(0, n)
i <- 1
while(i <= 11) {
ind <- ceiling(t[i] * n)
f[ind:n] <- f[ind:n] + h[i]
i <- i + 1
}
f
}