 nargin&lt;5, Cov=[]; <span class="keyword">end</span>
0013 fid=fopen(outfile,<span class="string">'w'</span>);
0014 <span class="keyword">if</span> fid&lt;0, error(<span class="string">'File cannot be opened!'</span>); <span class="keyword">end</span>
0015 xm=(x(1:end-1)+x(2:end))/2;
0016 zm=(z(1:end-1)+z(2:end))/2;
0017 
0018 st=sprintf(<span class="string">'#%s\t%s\t%s\t%s\t%s'</span>,<span class="string">'x1/m'</span>,<span class="string">'x2/m'</span>,<span class="string">'z1/m'</span>,<span class="str