view examples/firstmexdemo.c @ 15517:3f1b306e2ba9

rgbplot: return graphics handle if requested
author Carnë Draug <carandraug+dev@gmail.com>
date Sat, 13 Oct 2012 21:53:21 +0200
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;
}