annotate examples/firstmexdemo.c @ 11542:695141f1c05c ss-3-3-55

snapshot 3.3.55
author John W. Eaton <jwe@octave.org>
date Sat, 15 Jan 2011 04:53:04 -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 }