畳みこみ

tau <- seq(from=-10,to=10,length=100)
f.tau <- 0.3*dnorm(tau,0,1)+0.7*dnorm(tau,5,2)
par(mfcol=c(2,2))
plot(tau,f.tau,type="l")
bin.w <- 0.9
my.g <- function(t,bin.w){
	ret <- rep(0,length(t))
	ret[which(t>=0 & t<bin.w)] <- 1
	ret
}
g.tau <- my.g(tau,bin.w)
plot(tau,g.tau,type="l")

f.g.tau <- outer(f.tau,g.tau)
matplot(f.g.tau,type="l")
image(f.g.tau)
par(mfcol=c(1,1))