Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Inplace array (mex)
Date: Sun, 28 Jun 2009 09:01:01 +0000 (UTC)
Organization: Boeing
Lines: 10
Message-ID: <h27bgd$k4l$1@fred.mathworks.com>
References: <h2540t$73d$1@fred.mathworks.com> <h25val$cna$1@fred.mathworks.com> <h2620t$162$1@fred.mathworks.com> <h263n9$ham$1@fred.mathworks.com> <h278bv$49d$1@fred.mathworks.com> <h279b1$4q3$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246179661 20629 172.30.248.35 (28 Jun 2009 09:01:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 28 Jun 2009 09:01:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:551175


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h279b1$4q3$1@fred.mathworks.com>...
> Below is part of the error message when it crashed. There is an internal check in libmwfl.dll and libmx.dll. Au revoir my freedom ;-(

OK. Maybe as a last resort you could try the following. Use the incomplete mxArray structure definition that Peter Boettcher has listed on a website (can't remember the website right now). You can find it in this thread:

http://www.mathworks.com/matlabcentral/newsreader/view_thread/247881#639280

Put that at the top of your mex file and then set the pdata pointer directly instead of using the mxSetPr function. That will bypass any checking that is going on with the mxSetPr call. I think that this will at least allow you to temporarily build the mxArray. Can't say what will happen once you try to use it or pass it back to MATLAB though.

James Tursa