Mercurial > hg > octave-lyh
view examples/firstmexdemo.c @ 13261:9134ca9d4ec8
new functions for Matlab compatibility
* prefs/module.mk: New file.
* scripts/Makefile.am: Include it.
(prefs/PKG_ADD): New target.
* addpref.m, getpref.m, ispref.m, rmpref.m, setpref.m, loadprefs.m,
saveprefs.m, prefsfile.m: New files.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 30 Sep 2011 22:15:47 -0400 |
parents | 6cb30a539481 |
children |
line wrap: on
line source
#include "mex.h" void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { mxArray *v = mxCreateDoubleMatrix (1, 1, mxREAL); double *data = mxGetPr (v); *data = 1.23456789; plhs[0] = v; }