From ece6a9f47a7d73061806f2d7e0788be86aa73688 Mon Sep 17 00:00:00 2001 From: Suraj Yerramilli Date: Sat, 27 Feb 2016 14:51:43 +0530 Subject: updating sim documentation --- man/sim.Rd | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'man') diff --git a/man/sim.Rd b/man/sim.Rd index 8bf35a5..a4dfe97 100644 --- a/man/sim.Rd +++ b/man/sim.Rd @@ -2,27 +2,30 @@ % Please edit documentation in R/sim.R \name{sim} \alias{sim} -\title{Simulate dynamic system} +\title{Simulate response of dynamic system} \usage{ -sim(model, input, innov = NULL, sigma = 0, seed = NULL) +sim(model, input, addNoise = F, innov = NULL, seed = NULL) } \arguments{ \item{model}{the linear system to simulate} \item{input}{a vector/matrix containing the input} -\item{innov}{an optional times series of innovations. If not provided, -innovations are generated using the \code{rnorm} function} +\item{addNoise}{logical variable indicating whether to add noise to the +response model. (Default: \code{FALSE})} -\item{sigma}{standard deviation of the innovations (Default= \code{0})} +\item{innov}{an optional times series of innovations. If not supplied (specified +as \code{NULL}), gaussian white noise is generated, with the variance specified in +the model (Property: \code{noiseVar})} -\item{seed}{integer indicating the seed value of the random number generator} +\item{seed}{integer indicating the seed value of the random number generator. +Useful for reproducibility purposes.} } \value{ -a vector containing the output +a vector containing the simulated output } \description{ -Simulate the response of a system given the input +Simulate the response of a system to a given input } \details{ The routine is currently built only for SISO systems. Future versions will @@ -32,7 +35,7 @@ include support for MIMO systems. # ARX Model u <- rnorm(200,sd=1) model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1) -y <- sim(model,u,sigma=0.1) +y <- sim(model,u,addNoise=T) } -- cgit