the trouble with mex c

From: Martijn van den Branden (m.vandenbranden_at_student.tudelft.nl)
Date: 01/31/04


Date: Sat, 31 Jan 2004 16:40:20 +0100

Hi,

sorry if this message gets posted twice, i seem to have some problem posting
to newsgroups.

i've rewritten some loop in matlab using the mex interface method in c, and
i've achieved a reduction in calculation time of about five hours :).
however, the resulting arrays
are not the same as with matlab. this is the first time i write something in
c, and i suspect i'm making some
mistakes that causes memory regions to be overwritten, pointers to be
misused, that sort of thing that
doesn't make the lcc compiler shipped with matlab complain. i've got no
debugger and after rereading c and
mex documentation i've got no clue what to do. would someone care to take a
glance at the code
and maybe identify some beginners mistake that causes the erroneous results?
I can send the code
as an attachment.

I would greatly appreciate that,

Martijn