view examples/firstmexdemo.c @ 12447:890e89c3dfeb

More explicit error message when source with tests for dynamically linked functions not found (#30341)
author David Bateman <dbateman@free.fr>
date Tue, 15 Feb 2011 01:28:11 +0100
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;
}