diff options
author | Suraj Yerramilli | 2015-05-25 18:42:18 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-05-25 18:42:18 +0530 |
commit | 4df3d6525b9253375877eaa48dbbe36a379f3499 (patch) | |
tree | a6cf5ae756edab4416d58d3e376b1f1f8345095c /R | |
parent | f1b4017b0f0e07dfa8e24c14834af49bb71c4a3f (diff) | |
download | SysID-R-code-4df3d6525b9253375877eaa48dbbe36a379f3499.tar.gz SysID-R-code-4df3d6525b9253375877eaa48dbbe36a379f3499.tar.bz2 SysID-R-code-4df3d6525b9253375877eaa48dbbe36a379f3499.zip |
Added code for plotting step response
Diffstat (limited to 'R')
-rw-r--r-- | R/impulse.R | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/R/impulse.R b/R/impulse.R index fccce3d..6980725 100644 --- a/R/impulse.R +++ b/R/impulse.R @@ -52,5 +52,9 @@ plot.impulseest <- function(model){ #' @seealso \code{\link{impulseest}} #' @export step <- function(model){ - + title <- paste("Step Response \n From",model$x,"to",model$y) + stepResp <- cumsum(coef(model)) + plot(model$lags,stepResp,type="h",xlab="Lag",ylab= model$y, + main = title) + abline(h=0) } |