Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: help regarding 2D matrix using c mex file
Date: Tue, 18 Aug 2009 18:48:02 +0000 (UTC)
Organization: Boeing
Lines: 19
Message-ID: <h6et12$284$1@fred.mathworks.com>
References: <h6b2k6$oh2$1@fred.mathworks.com> <h6b3nq$6ft$1@fred.mathworks.com> <h6dsve$37p$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 1250621282 2308 172.30.248.35 (18 Aug 2009 18:48:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 18 Aug 2009 18:48:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:564270


"oruganti murthy" <omurthy@yahoo.com> wrote in message <h6dsve$37p$1@fred.mathworks.com>...
> Thank you very much Bruno.
> I changed it to 
> ****
> void py_dist(SAMPLE **a, int xDim, int yDim, SAMPLE **output)
> {
>     int x,y;
>     for(x = 0; x<=xDim; ++x)
>         for (y = 0; y<=yDim; ++y)
>             *output++ = *a++ ;
> }
> ********
> and now I'm able to read the 2D array.
> But how to overcome the Transposed form of reading array from MATLAB...?
> 

This doesn't look correct at all. I suspect you still have bugs in the code if this is what you are currently using. Would you mind posting your current complete routine for us to look at?

James Tursa