#include "mex.h"

void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
    int i;
    
    mexPrintf("********** mex_test program **********\n");
    mexPrintf(" - num. of inputs           : %d\n", nrhs);
    mexPrintf(" - num. of expected outputs : %d\n", nlhs);
    
    /* If the number of inputs and outputs is not equal, display error message and exit */
    if (nrhs != nlhs)
    {
        mexErrMsgTxt("The number of input and output arguments must be the same.");
    }
    
    /* Create output variables */
    for (i = 0; i < nlhs; i++)
    {
        plhs[i] = mxCreateDoubleScalar(3.4);
    }
}