Skip to main content
. 2023 Jul 16;23(14):6434. doi: 10.3390/s23146434
Algorithm 6 DWT based denoising of EEG signal [79]
  • Input: X: EEG data matrix (rows represent the EEG channels)

  • Output: Y: matrix of cleaned data
    • Set the wavelet basis and level of decomposition
    • for each channel c in X do
      •     Compute the DWT coefficients of c at each level using the fatigue wavelet basis.
      •     Identify the approximation coefficients at the desired level as the artifact-free signal.
      •     Threshold the detail coefficients using a soft or hard thresholding technique.
      •     Reconstruct the cleaned signal by inverse DWT using the modified coefficients.
      •     Store the cleaned signal in the corresponding row of Y.
    • end for
    • return Y