Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: MATLAB hangs with MEX code
Date: Mon, 10 Aug 2009 20:36:19 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 15
Message-ID: <h5q0c3$q3r$1@fred.mathworks.com>
References: <h5puv2$oa2$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1249936579 26747 172.30.248.38 (10 Aug 2009 20:36:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 10 Aug 2009 20:36:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:562231



> 
> 
> /* Allocate intermediate & output memory */
> plhs[0] = mxCreateNumericMatrix(1, sizeList, mxINT16_CLASS, mxREAL);
> cVList = (int *)mxGetData(plhs[0]);
> plhs[1] = mxCreateNumericMatrix(1, sizeList, mxINT16_CLASS, mxREAL);
> cHList = (int *)mxGetData(plhs[1]);

Are you sure INT corresponds to mxINT16_CLASS? To me:

INT <-> mxINT32_CLASS
SHORT INT <-> CLASS

% Bruno