an>)
0050     error(<span class="string">'incorrect usage of write_FVCOM_z0, must provide filename'</span>)
0051 <span class="keyword">end</span>
0052 <span class="keyword">if</span> ~exist(<span class="string">'mytitle'</span>, <span class="string">'var'</span>)
0053     error(<span class="string">'incorrect usage of write_FVCOM_z0, must provide title field'</span>)
0054 <span class="keyword">end</span>
0055 
0056 <span class="comment">% check dimensions</span>
0057 nElems = numel(z0);
0058 <span class="ke