view examples/firstmexdemo.c @ 14205:fe2ace7a35da stable

Added tag release-3.6.0 for changeset 704f7895eef0
author John W. Eaton <jwe@octave.org>
date Sun, 15 Jan 2012 14:56:37 -0500
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;
}