diff options
author | Suraj Yerramilli | 2015-05-26 08:47:27 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-05-26 08:47:27 +0530 |
commit | e3db1fea8270aadd9879fe4cf86fa0c9513d41ee (patch) | |
tree | 807955763f039bd1025a353d3cc3cb76f286b9f1 | |
parent | 2ea66ed61bab3f4e0097fde1240fa92fd84c2e86 (diff) | |
download | SysID-R-code-e3db1fea8270aadd9879fe4cf86fa0c9513d41ee.tar.gz SysID-R-code-e3db1fea8270aadd9879fe4cf86fa0c9513d41ee.tar.bz2 SysID-R-code-e3db1fea8270aadd9879fe4cf86fa0c9513d41ee.zip |
Added an example for the impulseest function
-rw-r--r-- | R/impulse.R | 10 | ||||
-rw-r--r-- | man/impulseest.Rd | 9 |
2 files changed, 17 insertions, 2 deletions
diff --git a/R/impulse.R b/R/impulse.R index f2dca17..ca60c04 100644 --- a/R/impulse.R +++ b/R/impulse.R @@ -8,7 +8,15 @@ #' @param K Transport delay in the estimated impulse response #' (Default:\code{0}) #' -#' @seealso \code{\link{plot.impulseest}}, \code{\link{step}} +#' @seealso \code{\link{step}} +#' +#' @examples +#' uk <- rnorm(1000,1) +#' yk <- filter (uk,c(0.9,-0.4),method="recursive") + rnorm(1000,1) +#' data <- idframe(output=data.frame(yk),input=data.frame(uk)) +#' fit <- impulseest(data) +#' plot(fit) +#' #' @export impulseest <- function(data,M=30,K=0){ diff --git a/man/impulseest.Rd b/man/impulseest.Rd index 7d36f99..98e3365 100644 --- a/man/impulseest.Rd +++ b/man/impulseest.Rd @@ -18,7 +18,14 @@ impulseest(data, M = 30, K = 0) \code{impulseest} is used to estimate impulse response models in the given data } +\examples{ +uk <- rnorm(1000,1) +yk <- filter (uk,c(0.9,-0.4),method="recursive") + rnorm(1000,1) +data <- idframe(output=data.frame(yk),input=data.frame(uk)) +fit <- impulseest(data) +plot(fit) +} \seealso{ -\code{\link{plot.impulseest}}, \code{\link{step}} +\code{\link{step}} } |