summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-03-15 17:39:06 +0530
committerSuraj Yerramilli2016-03-15 17:39:06 +0530
commit123ff73c491c791fe056c97f287858fe20ce5f98 (patch)
treee2d12688f4865032d726494aaf62ef113c0078dd
parent72844ed965f645357664919f0803e25d75623ab7 (diff)
downloadSysID-R-code-123ff73c491c791fe056c97f287858fe20ce5f98.tar.gz
SysID-R-code-123ff73c491c791fe056c97f287858fe20ce5f98.tar.bz2
SysID-R-code-123ff73c491c791fe056c97f287858fe20ce5f98.zip
minor corrections in delay specification
-rw-r--r--R/poly.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/poly.R b/R/poly.R
index 516bd35..4d9aa01 100644
--- a/R/poly.R
+++ b/R/poly.R
@@ -36,7 +36,7 @@ idpoly <- function(A=1,B=1,C=1,D=1,F1=1,ioDelay=0,Ts=1,
noiseVar=1,unit = c("seconds","minutes",
"hours","days")[1]){
Bindex <- which.max(B!=0)
- ioDelay <- ifelse(Bindex==1,ioDelay,Bindex)
+ ioDelay <- ifelse(Bindex-1==0,ioDelay,Bindex-1)
B <- B[Bindex:length(B)]
out <- list(A= A,B=B,C=C,D=D,F1=F1,ioDelay = ioDelay,Ts=Ts,
noiseVar=noiseVar,unit=unit)