title: How can I get the mean out of every 8 values in an array in matlab?
body: <p>Goal: Getting the mean value of every 8 values so that the &quot;arrayfinal&quot; is reduced by factor 8.</p>
  <p>Example:
  Let's say we have an array which looks like following:
  array = [2 4 6 7 1 5 8 3 9 5 5 8 7 7 2 3 4 3 5 8 6 9 0 1]; % an array with 24 values</p>
  <p>arrayfinal = [4.5 5.75 4.5];</p>
  <p>How is the code to get from &quot;array&quot; to &quot;arrayfinal&quot;?</p>
  <p>Best wishes,
  Johannes</p>