diff options
-rw-r--r-- | R/myCode/rbs1.R | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/R/myCode/rbs1.R b/R/myCode/rbs1.R deleted file mode 100644 index 6d6d3a5..0000000 --- a/R/myCode/rbs1.R +++ /dev/null @@ -1,11 +0,0 @@ -gen.rbs<-function(n,band,levels){ - require(signal) - v<-rnorm(n) - - v<-sapply(v, function(x) {if(x==0) rnorm(1) else x}, simplify = 'vector') - #if we do not specify else case, it assigns it as NULL - bfilt<-butter(8,band,type = 'pass',plane = 'z') - v1<-filter(bfilt,v) - v1<-sapply(v1, function(x) {if(x>0) levels[2] else levels[1]}) - return(v1) -}
\ No newline at end of file |