annotate examples/firstmexdemo.c @ 14164:a737b3fb9c4d stable ss-3-5-92

snapshot 3.5.92 * configure.ac (AC_INIT): Version is now 3.5.92. (OCTAVE_RELEASE_DATE): Now 2012-01-06.
author John W. Eaton <jwe@octave.org>
date Fri, 06 Jan 2012 14:34:06 -0500
parents 6cb30a539481
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6577
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
1 #include "mex.h"
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
2
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
3 void
7081
503001863427 [project @ 2007-10-31 01:08:14 by jwe]
jwe
parents: 7019
diff changeset
4 mexFunction (int nlhs, mxArray *plhs[], int nrhs,
9932
6cb30a539481 untabify files in examples directory
John W. Eaton <jwe@octave.org>
parents: 9053
diff changeset
5 const mxArray *prhs[])
6577
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
6 {
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
7 mxArray *v = mxCreateDoubleMatrix (1, 1, mxREAL);
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
8 double *data = mxGetPr (v);
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
9 *data = 1.23456789;
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
10 plhs[0] = v;
f72d6d4b735a [project @ 2007-04-25 15:54:59 by jwe]
jwe
parents:
diff changeset
11 }