summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-06-06 21:11:31 +0530
committerSuraj Yerramilli2015-06-06 21:11:31 +0530
commit89d18e89331dfcb33aa08ef79d04bf07ccc8e971 (patch)
tree6aaf4c9739b3bcd5c0e7894c5ec4422412e95936
parent17294fc2555e107198de5fbb27122e1fdddb6593 (diff)
downloadSysID-R-code-89d18e89331dfcb33aa08ef79d04bf07ccc8e971.tar.gz
SysID-R-code-89d18e89331dfcb33aa08ef79d04bf07ccc8e971.tar.bz2
SysID-R-code-89d18e89331dfcb33aa08ef79d04bf07ccc8e971.zip
plot function optimised
-rw-r--r--R/idframe.R16
1 files changed, 4 insertions, 12 deletions
diff --git a/R/idframe.R b/R/idframe.R
index b06d0ba..de49835 100644
--- a/R/idframe.R
+++ b/R/idframe.R
@@ -94,17 +94,17 @@ plot.idframe <- function(object,par=list(mar=c(3,4,3,2)),
for(i in seq(m)){
for(j in seq(p)){
par(mfrow=c(2,1),mar=c(3,4,2,2))
- plot(index(object),object$output[,j],xlab=object$type,
+ plot(object$frequencies,object$output[,j],xlab=object$type,
ylab=colnames(object$output)[j],type="l",...)
- plot(index(object),object$input[,i],xlab=object$type,
+ plot(object$frequencies,object$input[,i],xlab=object$type,
ylab=colnames(object$input)[i],type="l",...)
}
}
} else {
par(mfrow=c(2,1),mar=c(3,4,3,2))
- plot(index(object),object$output[,1],xlab=object$type,
+ plot(object$frequencies,object$output[,1],xlab=object$type,
ylab=colnames(object$output),type="l",...)
- plot(index(object),object$input[,1],xlab=object$type,
+ plot(object$frequencies,object$input[,1],xlab=object$type,
ylab=colnames(object$input),type="l",...)
}
} else{
@@ -122,14 +122,6 @@ plot.idframe <- function(object,par=list(mar=c(3,4,3,2)),
}
}
-index <- function(object){
- if(object$type=="time"){
- return(seq(from=object$t.start,to=object$t.end,by=object$Ts))
- } else {
- return(object$frequencies)
- }
-}
-
#' @export
summary.idframe <- function(object){
out_sum <- summary(object$output)