diff options
author | Suraj Yerramilli | 2015-03-22 21:00:12 +0530 |
---|---|---|
committer | Suraj Yerramilli | 2015-03-22 21:00:12 +0530 |
commit | a74ce396b0dac33aee99737428f4efb041217ee0 (patch) | |
tree | 61f11c49590c269be46e89f1414d954bf5f02307 /R | |
parent | a93a9661626862afd941996a1d5f27f3cc0138bf (diff) | |
download | SysID-R-code-a74ce396b0dac33aee99737428f4efb041217ee0.tar.gz SysID-R-code-a74ce396b0dac33aee99737428f4efb041217ee0.tar.bz2 SysID-R-code-a74ce396b0dac33aee99737428f4efb041217ee0.zip |
Added documentation for the basic transfer function model
Diffstat (limited to 'R')
-rw-r--r-- | R/tf.R | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -1,11 +1,24 @@ -# S3 class for defining transfer functions +#' S3 class for transfer functions +#' +#' \code{tf} is an S3 class for defining transfer functions. +#' +#' @param num coefficients of the numerator plynomial in q^{-1} +#' @param den coefficients of the denominator plynomial in q^{-1} +#' @param Ts sampling time +#' +#' @return an object of class tf +#' @export tf <- function(num=c(1),den=c(1),Ts=1){ out <- list(num=num,den=den,Ts=Ts) class(out) <- "tf" return(out) } -# Display the Transfer Function +#' Display the Transfer Function +#' +#' Printing method for objects inheriting from class \code{tf} +#' +#' @param G an object of class \code{tf} print.tf <- function(G){ cat("Transfer Function \nG(q^{-1}) = B(q^{-1})/A(q^{-1}) \n\n") cat("A(q^{-1}) = ") |