Mercurial > octave-nkf
view examples/myset.c @ 19538:d7b55fc1b37d
Add missing texinfo docstrings to all audio functions
* libinterp/dldfcn/__player_audioplayer__.cc,
libinterp/dldfcn/__recorder_audiorecorder__.cc,
scripts/audio/@audioplayer/subsasgn.m, scripts/audio/@audioplayer/subsref.m,
scripts/audio/@audiorecorder/__get_properties__.m,
scripts/audio/@audiorecorder/subsasgn.m,
scripts/audio/@audiorecorder/subsref.m: Add texinfo docstrings to all
functions, internal or otherwise.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Thu, 03 Oct 2013 08:33:46 -0400 |
parents | be41c30bcb44 |
children | 224e76250443 |
line wrap: on
line source
#include "mex.h" void mexFunction (int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) { char *str; mxArray *v; if (nrhs != 2 || ! mxIsString (prhs[0])) mexErrMsgTxt ("expects symbol name and value"); str = mxArrayToString (prhs[0]); v = mexGetArray (str, "global"); if (v) { mexPrintf ("%s is a global variable with the following value:\n", str); mexCallMATLAB (0, NULL, 1, &v, "disp"); } v = mexGetArray (str, "caller"); if (v) { mexPrintf ("%s is a caller variable with the following value:\n", str); mexCallMATLAB (0, NULL, 1, &v, "disp"); } // WARNING!! Can't do this in MATLAB! Must copy variable first. mxSetName (prhs[1], str); mexPutArray (prhs[1], "caller"); }