title: Matlab - PCA on EEG data?
body: <p>I want to apply principal component analysis on my eeg data, but i'm little confused on how to do that on matlab. I have an NxM matrix, where N is the number of samples and M the number of EEG channels, and i want to end up having 1 time series with the 1st principal component.</p>
  
  <p>Is this the right way?</p>
  
  <pre><code>[coeff, score] = pca(eeg_data);
  new_data = score(:,1);
  </code></pre>
  
  <p>Thanks</p>