view examples/mycell.c @ 19536:97c9ba013ed1

configure.ac: Add --without-portaudio and --without-sndfile options * configure.ac: Add --without-portaudio and --without-sndfile options to bypass checking for audio library dependencies.
author Mike Miller <mtmiller@ieee.org>
date Wed, 02 Oct 2013 00:14:09 -0400
parents be41c30bcb44
children 224e76250443
line wrap: on
line source

#include "mex.h"

void
mexFunction (int nlhs, mxArray* plhs[],
             int nrhs, const mxArray* prhs[])
{
  mwSize n;
  mwIndex i;

  if (nrhs != 1 || ! mxIsCell (prhs[0]))
    mexErrMsgTxt ("ARG1 must be a cell");

  n = mxGetNumberOfElements (prhs[0]);
  n = (n > nlhs ? nlhs : n);
  
  for (i = 0; i < n; i++)
    plhs[i] = mxDuplicateArray (mxGetCell (prhs[0], i));
}