Mercurial > hg > octave-max
comparison examples/myfunc.c @ 6581:1a414f670635
[project @ 2007-04-25 22:34:52 by jwe]
author | jwe |
---|---|
date | Wed, 25 Apr 2007 22:35:22 +0000 |
parents | d2bb3b8a8d20 |
children | 4270ded9ddc6 |
comparison
equal
deleted
inserted
replaced
6580:d2bb3b8a8d20 | 6581:1a414f670635 |
---|---|
3 void | 3 void |
4 mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) | 4 mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) |
5 { | 5 { |
6 const char *nm; | 6 const char *nm; |
7 nm = mexFunctionName (); | 7 nm = mexFunctionName (); |
8 mexPrintf("You called function: %s\n", nm); | 8 mexPrintf ("You called function: %s\n", nm); |
9 if (strcmp (nm, "myfunc") == 0) | 9 if (strcmp (nm, "myfunc") == 0) |
10 mexPrintf("This is the principal function\n", nm); | 10 mexPrintf ("This is the principal function\n", nm); |
11 return; | 11 return; |
12 } | 12 } |