title: index out of bounds because numel ()
body: <p>I want to check each of the <code>age</code> from a file named "2".  This "2" file contains ages and is formatted in the following way:</p>
  
  <ul>
  <li>2010</li>
  <li>1997</li>
  <li>0</li>
  <li>...</li>
  <li>...</li>
  </ul>
  
  <p>The code I have written to do this is below, but it returns an error:</p>
  
  <p><img src="https://i.stack.imgur.com/n6Cr2.png" alt="enter image description here">   </p>
  
  <pre><code>data_register = importdata('DATA/2')
  
  for i = 1:700
  
  year=data_register(i);
  
  age=2014-year(i);
  
  B22(A22&lt;=1)=1;
  B22(A22&gt;1&amp;A22&lt;50)=-1;
  B22(A22&gt;=50)=1; 
  
  
  D22(i)=B22';
  
  end
  
  feature22= D22'
  </code></pre>
  
  <p>What am I doing wrong?</p>