 fprintf(fid,<span class="string">'#%s\t%s\t%s\r\n'</span>,<span class="string">'xm/m'</span>,<span class="string">'zm/m'</span>,<span class="string">'rho/Ohmm'</span>);
0028     <span class="keyword">for</span> i = 1:min(length(zm),size(M,2)),
0029         <span class="keyword">for</span> j = 1:min(length(xm),size(M,1)),
0030             zz=zm(i);<span class="keyword">if</span> xz(j)&gt;0, zz=(xz(j)+xz(j+1))/2-zm(i); <span class="keyword">end</span>
0031             fprintf(fid,<span class="string">'%.2f\t