title: How to design a Bandstop and Bandpass filter using Butterworth using MATLAB
body: <p>I went over and over again with MATLAB Help and google but couldn't find any solution.</p>
  
  <p>First of all, designing the bandstop filter, the help says :</p>
  
  <p>type:'stop' for an order 2*n bandstop digital filter if Wn is a two-element vector, Wn = [w1 w2]. The stopband is w1 &lt; w &lt; w2. </p>
  
  <p>Does that mean when i design my bandstop filter, the code should be : </p>
  
  <pre><code>[B,A] = butter(2*N,Wn);  OR  [B,A] = butter(N,Wn);`
  </code></pre>
  
  <p>where the order <code>N</code> is given by user during runtime and <code>Wn</code> is calculated using <code>buttrod</code> function with known parameters.</p>
  
  <p>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 ?</p>