Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: mxGetNumberOfDimensions missing ?
Date: Tue, 27 Oct 2009 18:32:20 +0000 (UTC)
Organization: Boeing
Lines: 12
Message-ID: <hc7ebk$8nl$1@fred.mathworks.com>
References: <2009102112385016807-spammersgohere@spaminvalid> <hbnv28$c5h$1@fred.mathworks.com> <2009102115045916807-spammersgohere@spaminvalid> <hbo6a4$k5l$1@fred.mathworks.com> <2009102311375416807-spammersgohere@spaminvalid> <hc56i5$3p4$1@fred.mathworks.com> <hc5jrq$b1n$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 1256668340 8949 172.30.248.35 (27 Oct 2009 18:32:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 27 Oct 2009 18:32:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:580426


"James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hc5jrq$b1n$1@fred.mathworks.com>...
> "James Tursa" <aclassyguy_with_a_k_not_a_c@hotmail.com> wrote in message <hc56i5$3p4$1@fred.mathworks.com>...
> > 
> > Is there another way to do this and get a pointer with associated size info attached? I don't think so. 
> 
> I just had another thought. It might be possible to get the pointer passed back through a COMMON block. I will make some tests and let you know ...
> 
> James Tursa

It works!  This is going to make it a *lot* simpler to use mxArray variables in Fortran code, because you will be able to simply call a function with the mxArray pointer as an input and get back a Fortran pointer with the dimensions already set, so you can use it as a regular Fortran 2D matrix from that point on with *no* data copying involved.  I will clean up my code and post an example later this week. Thanks for the original post ... I never would have thought to use pointers this way until I read your post.

James Tursa