# include "mex.h"
# include "mexargs.h"

void mexFunction(int nlhs,       mxArray *plhs[],
                 int nrhs, const mxArray *prhs[])
{

# define MEXNAME copydoublemex

 /* out = copydoublemex(in); */

# define OUT pout[0]

# define IN  prhs[0] /* double */

 CHECK_NARGIN_EQ(1);

 CHECK_DOUBLE(IN);

 CHECK_NARGOUT_LE(1);

 mxArray *pout[1];

 OUT = mxDuplicateArray(IN);

 ASSIGN_PLHS;
}
