From 658afa181832442a9198636a88dbd707c4538d51 Mon Sep 17 00:00:00 2001 From: ashwinrcs Date: Mon, 12 Oct 2015 16:40:29 +0530 Subject: updated --- R/rgs.R | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 R/rgs.R (limited to 'R/rgs.R') diff --git a/R/rgs.R b/R/rgs.R deleted file mode 100644 index ee1eca3..0000000 --- a/R/rgs.R +++ /dev/null @@ -1,24 +0,0 @@ -#' @export -idin.rgs <- function(n,band,var){ - # Function to generate a random Gaussian - # signal of given frequency band and variance - require(signal) - uk1 <- rnorm(n,mean = 0,sd = 1) - - for(i in 1:n){ - #Checking for zeros - - if(uk1[i] == 0){ - uk1[i] <- rnorm(1,mean = 0,sd = 1) - } - } - # Getting the filter coefficients - bfilt <- butter(8,c(band[1],band[2]),type = "pass",plane = "z") - - # Filtering the signal - ukf <- filter(bfilt,uk1) - - # Adjusting for required variance - uk <- sqrt(var)*ukf - return(uk) -} \ No newline at end of file -- cgit