title: Extracting EEG Components from Signal within MATLAB
body: <p>I have a simple EEG signal in MATLAB such as that shown in the figure below. And what I wanted was to extract the components of the EEG according to the following table.</p>
  
  <ul>
  <li>Delta - up to 4 Hz;</li>
  <li>Theta - 4 -> 8 Hz</li>
  <li>Alpha - 8 -> 13 Hz</li>
  <li>Beta - 13 -> 30 Hz</li>
  <li>Gamma - 30 -> 100 Hz</li>
  </ul>
  
  <p>In a first attempt to solve this problem I tried to build a bandpass filter with 'fdatool' from MATLAB to extract the component' theta 'signal, but without success.</p>
  
  <p>Along attached the code for the filter obtained with the 'fdatool'.</p>
  
  <pre><code>function Hd = filt_teta
  %FILTROPARA TETA Returns a discrete-time filter object.
  
  %
  % M-File generated by MATLAB(R) 7.9 and the Signal Processing Toolbox 6.12.
  %
  % Generated on: 05-May-2011 16:41:40
  %
  
  % Butterworth Bandpass filter designed using FDESIGN.BANDPASS.
  
  % All frequency values are in Hz.
  Fs = 48000;  % Sampling Frequency
  
  Fstop1 = 3;           % First Stopband Frequency
  Fpass1 = 4;           % First Passband Frequency
  Fpass2 = 7;           % Second Passband Frequency
  Fstop2 = 8;           % Second Stopband Frequency
  Astop1 = 80;          % First Stopband Attenuation (dB)
  Apass  = 1;           % Passband Ripple (dB)
  Astop2 = 80;          % Second Stopband Attenuation (dB)
  match  = 'stopband';  % Band to match exactly
  
  % Construct an FDESIGN object and call its BUTTER method.
  h  = fdesign.bandpass(Fstop1, Fpass1, Fpass2, Fstop2, Astop1, Apass, ...
                        Astop2, Fs);
  Hd = design(h, 'butter', 'MatchExactly', match);
  </code></pre>
  
  <p>Any suggestions how I can solve the problem?</p>
  
  <p>Thanks to all</p>