www.pudn.com > matlab7.x.rar > timestwo.c


#include "mex.h" 
void mexFunction(int nlhs, mxArray *plhs[],  
    int nrhs, const mxArray *prhs[])  
{ 
    int i, j, m, n; 
    double *data1, *data2; 
     
	/* 输入、输出变量数目必须相同*/ 
    if (nrhs != nlhs) 
        mexErrMsgTxt("The number of input and output arguments must be the same."); 
     
    /* 输入必须是数字型 */ 
    for (i=0; i