p.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function N=read2dfile(datfile)</a>
0002 
0003 <span class="comment">% READ2DFILE - Read 2d data file (all file types)</span>
0004 <span class="comment">% N = read2dfile(datfile)</span>
0005 
0006 N=[];
0007 <span class="keyword">if</span> exist(datfile)~=2, error(<span class="string">'File does not exist!'</span>); <span class="keyword">end</span>
0008 [fpath,name,ext]=fileparts(datfile);
0009 lext=lower(ext)