view examples/myfunc.c @ 6580:d2bb3b8a8d20

[project @ 2007-04-25 22:19:03 by dbateman]
author dbateman
date Wed, 25 Apr 2007 22:20:28 +0000
parents
children 1a414f670635
line wrap: on
line source

#include "mex.h"

void
mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
  const char *nm;
  nm = mexFunctionName ();
  mexPrintf("You called function: %s\n", nm);
  if (strcmp (nm, "myfunc") == 0)
    mexPrintf("This is the principal function\n", nm);
  return; 
}