filtfilt in DSP.jl - I really don't get it


Hi dear community members,

while making bigger steps forwards switching completely from Matlab to Julia here and there I am often struggling to solve some issues. This is mainly due to the poor/missing documentation of the packages. At the moment I am trying to make the filtfilt function run in DSP.jl (BTW: I am not an expert in filter designing…). Just to make it simple: My corresesponding matlab code is given below. But for hours now I have no idea how to realize that with DSP.jl. Anyone able to help ? Thank you…

Bandpass Filter in Matlab
Wn=[0.5 15]/((1/dt)/2); % Cut off frequencies 0.5 Hz & 15 Hz
[b,a] = butter(4,Wn,‘bandpass’); % Filter coefficients for bandpass
filtered_signal = filtfilt(b,a,raw_signal); % Application of the filter

julia> using DSP

julia> myfilter = digitalfilter(Bandpass(0.1,0.15),Butterworth(2));

julia> mydata = rand(100);

julia> filtfilt(myfilter,mydata)

This seems to work, hopefully it will help you make some progress. This is adapted from the example section on this page: