R/ConvolveTrace.R

Defines functions ConvolveTrace

Documented in ConvolveTrace

ConvolveTrace = function(x, DPZ, dec = 1){
  if(dec != 1){
    n = length(x)
    x = Oversample(x, dec)
  }
  dt = DPZ$dt
  # obtain coefficients
  ba = PZ2Coef(DPZ, dt)

  # convolve to voltage
  volt = filter(DPZ$Zpg, x)

  # decimate if necessary
  if(dec != 1){
    volt = volt[1:n * dec]
  }
  return(volt)
}

Try the TDD package in your browser

Any scripts or data that you put into this service are public.

TDD documentation built on May 2, 2019, 4:51 a.m.