diff options
author | Suraj Yerramilli | 2015-06-03 16:36:09 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-06-03 16:36:09 +0530 |
commit | 4a682bcd0a1fbba1b7424693c7c850f0535ada00 (patch) | |
tree | 940d349fa1eaf1805cdc66d2356c2216ccf8a94c | |
parent | f66b12dec2f44bc078ab6116b6e5fe44720ffb63 (diff) | |
download | SysID-R-code-4a682bcd0a1fbba1b7424693c7c850f0535ada00.tar.gz SysID-R-code-4a682bcd0a1fbba1b7424693c7c850f0535ada00.tar.bz2 SysID-R-code-4a682bcd0a1fbba1b7424693c7c850f0535ada00.zip |
Minor Corrections
-rw-r--r-- | R/nonparam.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/nonparam.R b/R/nonparam.R index a9243bc..892027b 100644 --- a/R/nonparam.R +++ b/R/nonparam.R @@ -113,10 +113,11 @@ spa <- function(data,npad=255){ #' @export etfe <- function(data){ require(sapa) - temp <- cbind(data$output,data$input) + temp <- cbind(as.ts(data$output),as.ts(data$input)) tempfft <- mvfft(temp)/dim(temp)[1] freq <- seq(from=1,to=dim(temp)[1],by=1)/dim(temp)[1]*pi/data$Ts - out <- idfrd(response=tempfft[,1]/tempfft[,2],freq=freq,Ts=data$Ts) + out <- idfrd(response=as.complex(tempfft[,1]/tempfft[,2]),freq=freq, + Ts=data$Ts) return(out) } |