The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: CMEX-problem with BORLANDC-compiler
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Ivo Merks

Posts: 4
Registered: 12/7/04
CMEX-problem with BORLANDC-compiler
Posted: Jul 16, 1996 1:21 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I'm using a BORLANDC-compiler C++ 3.1 to compile cmex-files for Matlab
4.2.1.c on a Windows 3.11 system.
Compilation and linking is no problem, but when I try to execute the file,
Matlab generates an execution error and quits. The used cmex file is the

#include <mex.h>

void mexFunction(int nlhs,
Matrix *plhs[],
int nrhs,
Matrix *prhs[])

if (nrhs!=1)
mexErrMsgTxt("Must ghave one input argument");
if (nlhs!=1)
mexErrMsgTxt("Must have one output argument");
if (mxIsComplex(prhs[0]))
mexErrMsgTxt("Input must be real");
mexPrintf("Hello world\n");

The execution error appears when the last error message is called, i.e
when a complex value is passed onto the function.

Has anyone come accross this problem and knows a solution?

Thanks very much

I.L.D.M. (Ivo) Merks, e-mail: tel:(31)(0)15-2782021
Acoustics Group, Department of Applied Physics home phone:(31)(0)15-2621645
Delft University of Technology, the Netherlands

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.