view examples/firstmexdemo.c @ 12583:bb29b58e650c release-3-4-x

abandon release-3-4-x branch in favor of workflow using stable and default branches and merging stable to default periodically
author John W. Eaton <jwe@octave.org>
date Fri, 08 Apr 2011 09:06:04 -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;
}