title: Removing DC component for matrix in chuncks in octave
body: <p>I'm new to octave and if this as been asked and answered then I'm sorry but I have no idea what the phrase is for what I'm looking for.</p>
  <p>I trying to remove the DC component from a large matrix, but in chunks as I need to do calculations on each chuck.</p>
  <p>What I got so far</p>
  <pre><code>r = dlmread('test.csv',';',0,0);
  x = r(:,2);
  y = r(:,3); % we work on the 3rd column
  
  d = 1
  while d &lt;= (length(y) - 256)
      e = y(d:d+256);
      avg = sum(e) / length(e);
      k(d:d+256) = e - avg;      % this is the part I need help with, how to get the chunk with the right value into the matrix
      d += 256;
  endwhile
  
  % to check the result I like to see it
  plot(x, k, '.');
  
  </code></pre>
  <p>if I change the line into:</p>
  <pre><code>k(d:d+256) = e - 1024;
  </code></pre>
  <p>it works perfectly.
  I know there is something like an element-wise operation, but if I use <code>e .- avg</code> I get this:</p>
  <p><strong>warning: the '.-' operator was deprecated in version 7</strong></p>
  <p>and it still doesn't do what I expect.</p>
  <p>I must be missing something, any suggestions?</p>
  <p>GNU Octave, version 7.2.0 on Linux(Manjaro).</p>