Mercurial > octave
view examples/code/myfunc.c @ 31201:a8b0acc018a2
maint: merge stable to default
author | Rik <rik@octave.org> |
---|---|
date | Wed, 24 Aug 2022 08:55:39 -0700 |
parents | c8240a60dd01 |
children |
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; }