a guest Sep 16th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val (b, a) = new TransferFunctionBuilder()
  2.     .butterworthApproximation(3)                  // The order of Butterworth filter
  3.     .digitalize(30)                               // digital filter with sampling rate at 30 Hz
  4.     .transformToLowPass(3.5)                      // Low-pass filter with cutoff frequency 3.5Hz
  5.     .coefficients
  7. val x = InputDataToBeFiltered  
  8. val y = lfilter(b, a, x)                           // x is sequence of input signals
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand