diff options
author | Suraj Yerramilli | 2015-12-30 22:30:25 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-12-30 22:30:25 +0530 |
commit | 957b222a1e66af5757bf9973311c6f8409db44fc (patch) | |
tree | 89e1583359ce92f0fe1fd0b38312d00d13d9bd08 /R | |
parent | c12f7913fe2a683e40494065f4465294acbdcee6 (diff) | |
download | SysID-R-code-957b222a1e66af5757bf9973311c6f8409db44fc.tar.gz SysID-R-code-957b222a1e66af5757bf9973311c6f8409db44fc.tar.bz2 SysID-R-code-957b222a1e66af5757bf9973311c6f8409db44fc.zip |
Syntax additions
Diffstat (limited to 'R')
-rw-r--r-- | R/estpoly.R | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/R/estpoly.R b/R/estpoly.R index 4fa626d..afba0c2 100644 --- a/R/estpoly.R +++ b/R/estpoly.R @@ -54,18 +54,19 @@ print.summary.estpoly <- function(object,...){ #' @export predict.estpoly <- function(model,newdata=NULL){ - require(signal) if(is.null(newdata)){ return(fitted(model)) } else{ mod <- model$sys y <- outputData(newdata); u <- inputData(newdata) if(mod$type=="arx"){ - f1 <- Ma(c(rep(0,mod$ioDelay),mod$B)) - f2 <- Ma(c(0,-mod$A[-1])) + f1 <- signal::Ma(c(rep(0,mod$ioDelay),mod$B)) + f2 <- signal::Ma(c(0,-mod$A[-1])) ypred <- signal::filter(f1,u) + signal::filter(f2,y) } return(ypred) + } else if(mod$type=="armax"){ + } } |