Butterworth filter for signal processing I have a school project to be able to move a wheelchair according to user instruction. I am currently starting my project by using MATLAB and I have acquire several data for the training purpose. I am stuck at applying the butterworth filter to the signal, here is a sample of my training data $\tt go10.wav$. And here is my code:

[x,Fs] = audioread('go10.wav'); % to read the data
plot(x) ; % plot the data before aprplying the filter
n = 3; % the number of order
beginFreq = 800 / (Fs/2);
endFreq = 2000 / (Fs/2);
[b,a] = butter(n, [beginFreq, endFreq], 'bandpass');
y = filter(b, a, x);
figure;
plot(y) ; % plot the data after applying the filter
p = audioplayer(y,Fs);
play(p) ; % play the record after applying the filter


Here the plotting result,



So my question is, 


Did I do it right? about the begin and end frequency? and is my n correct?
And what can you tell me about this butterworth filter? I know that it's trying to focus on the human voice, but what exactly it does?
First of all when you work with MATLAB I suggest you to use a time axis t.

[x,Fs] = audioread('go10.wav'); % to read the data
t=(0:length(x)-1)/Fs;
plot(t,x) ; % Now when you plot you can see the time in seconds


The code seems to be correct. A butterworth bandpass filter, like others bandpass filter keep only the frequencies in the interval from beginFreq and endFreq. It is impossible to make a perfect filter, so there are a lot of filters like bessel, cebicev, butterworth,... each one have some particular properties and the choice of the better filter depends on the application. In sound processing butterworth filter is quite good. The human voice goes from 100Hz to 1100Hz, if you want to keep the voice in your signal you should change your values to:

beginFreq = 100/ (Fs/2);
endFreq = 1100/ (Fs/2);


A passband filter, like this butterworth, keep only the frequencies in the range you have chosen, so if you have noises in your signal that can't are human voices this filter will remove them. However this filter keeps all noises that have frequency in the vocal range.