<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello Again,<br>
      <br>
      I think there's an error in my response. I think removing the
      linear trend should also set the mean to zero already since the
      best fit line incorporates vertical offset.  Sorry about that.  <br>
      <br>
      A<br>
      <pre class="moz-signature" cols="72">
</pre>
      On 12/5/14, 4:20 PM, Yun Wen wrote:<br>
    </div>
    <blockquote
cite="mid:5546552AC7F6814B8C9826920C70E5AE3E613B6546@EXCHANGE2.ad.nottingham.ac.uk"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:\5B8B\4F53;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@\5B8B\4F53";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hi all, I want to remove DC offset before
          applying the high-pass filter. I  was wondering if I can
          achieve that by putting cfg.detrend = 'yes' before
          cfg.hpfilter = 'yes', something like:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">cfg = []; <o:p></o:p></p>
        <p class="MsoNormal">cfg.dataset = filename_raweeg;<o:p></o:p></p>
        <p class="MsoNormal">cfg.detrend = 'yes'; <o:p></o:p></p>
        <p class="MsoNormal">cfg.hpfilter = 'yes';<o:p></o:p></p>
        <p class="MsoNormal">cfg.hpfiltord = 2; % Order of the filter =
          2.<o:p></o:p></p>
        <p class="MsoNormal">cfg.hpfreq = 0.1; % High-pass cutoff at 0.1
          Hz;<o:p></o:p></p>
        <p class="MsoNormal">[data] = ft_preprocessing (cfg);<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thank you in advance.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Best,<o:p></o:p></p>
        <p class="MsoNormal">Yun<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <pre>

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
</pre>
    </blockquote>
    <br>
  </body>
</html>