title: How to access to numbers from *.txt file in matlab?
body: <p>I have a data.txt file like:</p>
  
  <p>123 124 125 126</p>
  
  <p>I want to compare these number against num </p>
  
  <p>My code is like this</p>
  
  <pre><code> data= textread('data.txt','%d');
      num = 125;
      if num == data
           b = 1;
      else
           b = 0;
      end
  </code></pre>
  
  <p>but answer shows 0 ( b = 0 )</p>
  
  <p>how to scan these numbers?</p>