view examples/firstmexdemo.c @ 12993:dfab2a8ca545 stable

doc: update sscanf doc string to match current behavior * file-io.cc (Fsscanf): Document POS output.
author John W. Eaton <jwe@octave.org>
date Wed, 24 Aug 2011 11:20:26 -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;
}