There is an error when you define the wn1 and wn2 for the filter. The frequencies are: wn1 = bandfilt_freq1/data_tr(i).sampleRate*2; wn2 = bandfilt_freq2/data_tr(i).sampleRate*2; You need to add the "2" factor. Best Miguel