diff options
author | Suraj Yerramilli | 2016-03-14 11:47:43 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2016-03-14 11:47:43 +0530 |
commit | 2054fe22327e485c43a75520b886307480e37f11 (patch) | |
tree | 4cadd2e00d98f6f2d7c2572a8d3de2f8c744aa12 /R/estUtil.R | |
parent | 341d9b493b0858fc377ca49f15b3f0ba9bb6830a (diff) | |
download | SysID-R-code-2054fe22327e485c43a75520b886307480e37f11.tar.gz SysID-R-code-2054fe22327e485c43a75520b886307480e37f11.tar.bz2 SysID-R-code-2054fe22327e485c43a75520b886307480e37f11.zip |
added function to check structure of initial guess
Diffstat (limited to 'R/estUtil.R')
-rw-r--r-- | R/estUtil.R | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/R/estUtil.R b/R/estUtil.R index 353c100..6bc9159 100644 --- a/R/estUtil.R +++ b/R/estUtil.R @@ -217,7 +217,10 @@ bjGrad <- function(theta,e,dots){ return(l) } -inv <- function(H){ - chdecomp <- chol(H) - chol2inv(H) +checkInitSys <- function(init_sys){ + z <- strsplit(toString(sys.call(which=-1)),split = ",")[[1]][1] + if(init_sys$type!=z){ + errMes <- paste("An idpoly model of",toupper(z),"structure expected for the",z,"command.") + stop(errMes) + } }
\ No newline at end of file |