octave/matlab read text file line by line and save only numbers into matrix
<p>I have a question regarding octave or matlab data post processing.
I have files exported from fluent like below:</p>

<pre><code>                     "Surface Integral Report"

       Mass-Weighted Average
          Static Temperature                  (k)
</code></pre>

<hr>

<pre><code>          crossplane-x-0.001            1242.9402
          crossplane-x-0.025            1243.0017
          crossplane-x-0.050            1243.2036
          crossplane-x-0.075            1243.5321
          crossplane-x-0.100            1243.9176
</code></pre>

<p>And I want to use octave/matlab for post processing. 
If I read first line by line, and save only the lines with "crossplane-x-" into a new file, or directly save the data in those lines into a matrix. Since I have many similar files, I can make plots by just calling their titles.
But I go trouble on identify lines which contain the char "crossplane-x-". I am trying to do things like this:</p>

<pre><code>clear, clean, clc;
% open a file and read line by line
fid = fopen ("h20H22_alongHGpath_temp.dat");
% save full lines into a new file if only chars inside
txtread = fgetl (fid)
num_of_lines = fskipl(fid, Inf);
char = 'crossplane-x-'
for i=1:num_of_lines,
  if char in fgetl(fid)
    [x, nx] = fscanf(fid);
    print x
  endif
endfor
fclose (fid);
</code></pre>

<p>Would anybody shed some light on this issue ? Am I using the right function ? Thank you.</p>