Step 3: Filter Parameters
Using the EMG Tools Filter Parameters Panel

- 1
Choose Filter Type
Either bandpass or butterworth (lowpass) filters can be selected. Both filters are dual-pass zero-lag.
Note
Both butterworth and bandpass filter parameters are built using Matlab's
butter
function. - 2
Enter Filter Parameters
Enter all of the paramaters for the filter as well as for the linear envelope filter (single-pass butterworth).
- 3
Enter Downsample Frequency (Optional)
The desired downsampling frequency can be entered or left alone if downsampled data is not desired.
Choose the filter type.

The choice of filter is either a bandpass or a lowpass butterworth filter. Parameters for both are set up using Matlab's butter
function as shown below.
% Bandpass Filter
[B, A] = butter(order, [cutoff_low,cutoff_high]/(sample_frequency/2), 'bandpass');
% Butterworth Filter
[B, A] = butter(order, cutoff_high/(sample_frequency/2), 'low');
Low cutoff.

Frequencies below this cutoff will be removed if you are using the bandpass filter. If you are using the butterworth filter, this is not used.
High cutoff.

Frequencies above this cutoff value will be removed. This cutoff value is used for both bandpass and butterworth filter options.
Filter order.

Sets the order of the selected filter.
Note
This order parameter is additional to the effect of the dual-pass filter.
Linear envelope.

Sets the desired cutoff frequency of the linear envelope. Filter parameters are built using the code below.
% Set up linear envelope coefficients
[D, E] = butter(filter_order_LE, cutoff_LE/(sample_frequency/2), 'low');
% Use coefficients in single-pass filter
data_LE = filter(D, E, data_full_wave_rectified);
Linear envelope order.

Sets the order of the linear envelope.
Select downsample frequency.

If you would like to downsample the output data, set the desired downsample frequency here.