You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: meshface.m
    path of file: ./repos/iso2mesh
    
    the code of the file until where you have to start completion: function faces=meshface(elem,varargin)
%
% faces=meshface(elem,opt)
%

    
function faces=meshface(elem,varargin)
%
% faces=meshface(elem,opt)
%
% return all faces in a surface or volumetric mesh
%
% author: Qianqian Fang, <q.fang at neu.edu>
% date: 2011/02/26
%
% input:
%    elem:  element table of a mesh (support N-d space element)
%    opt: optional input, giving the additional options. If opt
%         is a struct, it can have the following field:
%       opt.nodeorder: if 1, assuming the elem node indices is in CCW 
%                      orientation; 0 use nchoosek() output to order faces
%         you can replace opt by a series of ('param', value) pairs.
%
% output:
%    face:  face list; each row is an face, specified by the starting and
%           end