summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-05-25 18:42:18 +0530
committerSuraj Yerramilli2015-05-25 18:42:18 +0530
commit4df3d6525b9253375877eaa48dbbe36a379f3499 (patch)
treea6cf5ae756edab4416d58d3e376b1f1f8345095c /R
parentf1b4017b0f0e07dfa8e24c14834af49bb71c4a3f (diff)
downloadSysID-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.R6
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)
}