#include #include "mex.h" void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxArray * prhs[]) { if(nrhs == 0) return; if(mxIsDouble(prhs[0]) && (mxGetN(prhs[0]) * mxGetM(prhs[0]) == 1) && (mxGetNumberOfDimensions(prhs[0]) == 2)) { mexPrintf("This is Double Scalar \n"); return; } if(mxIsDouble(prhs[0]) && (mxGetN(prhs[0]) * mxGetM(prhs[0]) != 0) && (mxGetNumberOfDimensions(prhs[0]) == 2)) { mexPrintf("This is Double Matrix\n"); return; } if(mxIsChar(prhs[0]) && (mxGetN(prhs[0]) * mxGetM(prhs[0]) == 1) && (mxGetNumberOfDimensions(prhs[0]) == 2)) { mexPrintf("This is Character \n"); return; } if(mxIsChar(prhs[0]) && (mxGetN(prhs[0]) * mxGetM(prhs[0]) != 0) && (mxGetNumberOfDimensions(prhs[0]) == 2)) { mexPrintf("This is String \n"); return; } return; }