title: Gaussian Filtering of accelerometer data
body: <p>I have accelerometer time series data and it is noisy. I wish to apply some low pass filters to remove noise using MATLAB. I found a very good answer at this link with very neat MATLAB Code <a href="https://stackoverflow.com/questions/1773542/matlab-filter-noisy-ekg-signal">(</a> <a href="https://stackoverflow.com/questions/1773542/matlab-filter-noisy-ekg-signal">MATLAB: filter noisy EKG signal</a>). The syntax it provides is:</p>
  
  <pre><code>window = 7;
  
  h = normpdf( -window:window, 0, fix((2*window+1)/6) );
  
  y = filter(h, 1, x);
  </code></pre>
  
  <p>However, in this formulation, the mean is set to 0 and standard deviation to 2*window+1)/6.
  My question is:</p>
  
  <p>(1) for choosing 1-D Gaussian filter, how do we choose the mean and standard deviation parameters? Or is there any other better way to understand this solution. </p>
  
  <p>(2) If the window size is N then should h be written as h=normpdf(-N:N, 0, fix(2*N+1)/(N-1)));</p>
  
  <p>Right now I do not have access to Signal Processing toolbox in MATLAB.
  Your help will be much appreciated</p>