postscript(file="sim/noise_spectrum.ps", horizontal=FALSE) split.screen(c(4,1)) i<-read.table("sim/rx_response.data") t<-i$V4 i_day<-i$V5 i_night<-i$V6 l=1000000 m=250 r<-rnorm(l) r_day<-convolve(r,rev(i_day), type="filter") r_night<-convolve(r,rev(i_night), type="filter") plot(r[1:m], type="l", ylab="Voltage", main="White noise") screen(2) plot(r_day[1:m], type="l", ylab="Voltage", main="Daylight noise") screen(3) plot(r_night[1:m], type="l", ylab="Voltage", main="Nighttime noise") screen(4) plot(density(r/sd(r)), main="Normalized distributions of white noise, RX daylight and RX nighttime noise", xlab="Voltage") lines(density(r_day/sd(r_day))) lines(density(r_night/sd(r_night))) close.screen(all.screens=TRUE)