summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-02-27 14:56:25 +0530
committerSuraj Yerramilli2016-02-27 14:56:25 +0530
commit1a349f52502044410b9523ecbc4762571a9267f8 (patch)
tree8fe7c8dc800bec215bbec2f6dbe988ca866af54d
parentece6a9f47a7d73061806f2d7e0788be86aa73688 (diff)
downloadSysID-R-code-1a349f52502044410b9523ecbc4762571a9267f8.tar.gz
SysID-R-code-1a349f52502044410b9523ecbc4762571a9267f8.tar.bz2
SysID-R-code-1a349f52502044410b9523ecbc4762571a9267f8.zip
Corrections in sim example
-rw-r--r--R/sim.R5
-rw-r--r--man/sim.Rd5
2 files changed, 6 insertions, 4 deletions
diff --git a/R/sim.R b/R/sim.R
index 35fe386..a3257f6 100644
--- a/R/sim.R
+++ b/R/sim.R
@@ -21,8 +21,9 @@
#'
#' @examples
#' # ARX Model
-#' u <- rnorm(200,sd=1)
-#' model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1)
+#' u <- idinput(300,"rgs")
+#' model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1,
+#' noiseVar=0.1)
#' y <- sim(model,u,addNoise=T)
#'
#' @export
diff --git a/man/sim.Rd b/man/sim.Rd
index a4dfe97..9aa1d11 100644
--- a/man/sim.Rd
+++ b/man/sim.Rd
@@ -33,8 +33,9 @@ include support for MIMO systems.
}
\examples{
# ARX Model
-u <- rnorm(200,sd=1)
-model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1)
+u <- idinput(300,"rgs")
+model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1,
+noiseVar=0.1)
y <- sim(model,u,addNoise=T)
}