title: Fast fourier transform for deasonalizing data in MATLAB
body: <p>I'm very much a novice at signal processing techniques, but I am trying to apply the fast fourier transform to a daily time series to remove the seasonality present in the data. The example I am working with is from here: 
  <a href="http://www.mathworks.com/help/signal/ug/frequency-domain-linear-regression.html" rel="nofollow">http://www.mathworks.com/help/signal/ug/frequency-domain-linear-regression.html</a></p>
  
  <p>While I understand how to implement the code as it is written in the example, I am having a hard time adapting it to my specific application. What I am trying to do is create a preprocessing function which deseasonalizes the training data using similar code to the above example. Then, using the same estimated coefficients from the in-sample data, deseasonalize the out-of-sample data to preserve its independence from the in-sample data. Basically, once the coefficients are estimated, I will normalize each new data point using the same coefficients. I suspect this is akin to estimating a linear trend, then removing it from the in-sample data, and then using the same linear model on unseen data to detrend it i the same manner. </p>
  
  <p>Obviously, when I estimate the fourier coefficients, the vector I get out is equal to the length of the in-sample data. The out-of-sample data is comprised of much fewer observations, so directly applying them is impossible. </p>
  
  <p>Is this sort of analysis possible using this technique or am I going down a dead end road? How should I approach that using the code in the example above?</p>