summaryrefslogtreecommitdiff
path: root/R/estUtil.R
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-03-14 11:47:43 +0530
committerSuraj Yerramilli2016-03-14 11:47:43 +0530
commit2054fe22327e485c43a75520b886307480e37f11 (patch)
tree4cadd2e00d98f6f2d7c2572a8d3de2f8c744aa12 /R/estUtil.R
parent341d9b493b0858fc377ca49f15b3f0ba9bb6830a (diff)
downloadSysID-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.R9
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