diff options
author | ashwinrcs | 2015-10-12 16:40:29 +0530 |
---|---|---|
committer | ashwinrcs | 2015-10-12 16:40:29 +0530 |
commit | 658afa181832442a9198636a88dbd707c4538d51 (patch) | |
tree | e4ce4242e09d20987a083325fbbc012b4926d2b4 /R/rgs.R | |
parent | f76f456d4e81b043c004fe1a052f1e3c2a89dac7 (diff) | |
download | SysID-R-code-658afa181832442a9198636a88dbd707c4538d51.tar.gz SysID-R-code-658afa181832442a9198636a88dbd707c4538d51.tar.bz2 SysID-R-code-658afa181832442a9198636a88dbd707c4538d51.zip |
updated
Diffstat (limited to 'R/rgs.R')
-rw-r--r-- | R/rgs.R | 24 |
1 files changed, 0 insertions, 24 deletions
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 |