octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with mexEvalString


From: Rik
Subject: Help with mexEvalString
Date: Thu, 8 Sep 2016 20:41:58 -0700

9/8/16

Could someone compile and run the following mex file under Matlab and see
what it does?  I'm interested in whether it ever gets to the second
mexPrintf line.

-- File: tstmex.c --
#include "mex.h"

void
mexFunction (int nlhs, mxArray *plhs[],
             int nrhs, const mxArray *prhs[])
{
  int status;
  const char * str = "[pi";

  mexPrintf ("Before\n");
  status = mexEvalString (str);
  mexPrintf ("After, status = %d\n", status);
}
-- End File --

I think these commands will do it

mex tstmex.c
tstmex ()

--Rik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]