annotate examples/firstmexdemo.c @ 12312:b10ea6efdc58 release-3-4-x ss-3-3-91

version is now 3.3.91
author John W. Eaton <jwe@octave.org>
date Mon, 31 Jan 2011 08:36:58 -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 }