gausswin | R Documentation |
Return the filter coefficients of a Gaussian window of length n
.
gausswin(n, a = 2.5)
n |
Window length, specified as a positive integer. |
a |
Width factor, specified as a positive real scalar. |
The width of the window is inversely proportional to the parameter a
.
Use larger a
for a narrower window. Use larger m
for a smoother
curve.
w = e^{(-(a*x)^{2}/2 )}
for x <- seq(-(n - 1) / n, (n - 1) / n, by = n)
.
The exact correspondence with the standard deviation of a Gaussian
probability density function is \sigma = (n - 1) / (2a)
.
Gaussian convolution window, returned as a vector.
Paul Kienzle, pkienzle@users.sf.net.
Conversion to R by Geert van Boxtel G.J.M.vanBoxtel@gmail.com.
g1 <- gausswin(64)
g2 <- gausswin(64, 5)
plot (g1, type = "l", xlab = "Samples", ylab =" Amplitude", ylim = c(0, 1))
lines(g2, col = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.