I went over and over again with MATLAB Help and google but couldn’t find any solution.
First of all, designing the bandstop filter, the help says :
type:’stop’ for an order 2*n bandstop digital filter if Wn is a two-element vector, Wn = [w1 w2]. The stopband is w1 < w < w2.
Does that mean when i design my bandstop filter, the code should be :
[B,A] = butter(2*N,Wn); OR [B,A] = butter(N,Wn);`
where the order N is given by user during runtime and Wn is calculated using buttrod function with known parameters.
Second of all, according to the help, only 3 types can be used to design a butterworth filter (low,high,and stop) , How do i design a bandpass filter ?
The documentation is confusing… you can have all 4 filer types:
where type = ‘stop’, ‘bandpass’, ‘low’, ‘high’