title: Pulling lines out of a file Matlab
body: <p>I want to pull every line in a file that has a certain word in it and format it a certain way using matlab.  I have started to do this but all my code keeps doing is pulling out the first line and repeating it over and over again.  It won't move onto any other line. I dont see how I would fix this. Here is my code.</p>
  
  <pre><code>fid=fopen('suspiciousfile.txt');
  myLine=fgetl(fid);
  countline=0;
  while ischar(myLine)
    strfind('Drexel', myLine)
    countline=countline+1;
    fprintf('Line #%d %s.\n', countline,myLine);
  end
  </code></pre>