title: Matlab data: Finding average of each column in plot
body: <p>I am a beginner at using MATLAB. I have data which has 17 columns showing wave heights and wind data over a period of 7 years.
  First 4 columns are the years (2005-2011), month, day and hour respectively.
  And the next columns are the respective recordings.</p>
  
  <p>I found a useful script here to plot these columns.</p>
  
  <pre><code>fid = fopen('wam1.txt','r'); 
  C = textscan(fid,'%f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f','headerlines',4,'commentstyle','--');
  fclose(fid);
  x = C{1}; y1 = C{5}; y2 = C{3};
  plot(x,y1)
  </code></pre>
  
  <p>Now, the graph consists of (for example) wind speed on Y axis and year (2005-2011) on X axis. And I have to find the average of wind speed for each year.
  Could anyone help me please.</p>
  
  <p>Thanks.</p>