view examples/firstmexdemo.c @ 15521:e92dde30f754

test: Modify strsplit test suite to match new mapper function behavior (bug #37535). * strsplit.m: Test for char(ones(1,0)) rather than numeric ones(1,0) when returning an empty field.
author Rik <rik@octave.org>
date Sun, 14 Oct 2012 20:54:53 -0700
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;
}