Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.fr>
Newsgroups: comp.soft-sys.matlab
Subject: Re: call by reference
Date: Sat, 12 Apr 2008 10:25:03 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 37
Message-ID: <ftq2lv$e97$1@fred.mathworks.com>
References: <8902033.1207992837734.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "Bruno Luong" <b.luong@fogale.fr>
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 1207995903 14631 172.30.248.38 (12 Apr 2008 10:25:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 12 Apr 2008 10:25:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:462554



Jeroen <jverhoeve@hotmail.com> wrote in message
<8902033.1207992837734.JavaMail.jakarta@nitrogen.mathforum.org>...
> Hi all,
> 
> For some GPS related calculations, I have a bunch of
vectors  and variables which are needed in a lot of functions.
> 
> The thing is that all those date belong togehter in some
way. When I would program in Jave, I would make a class from it.
> 
> So, what I did is making a new matlab data type which
bundles all this information. I added some functions such
that it acts just as a struct: I can acces the columns and
the elements. The nice advantage is that I could modify the
display function, such that I get a nice overview of the
data when omitting the ;
> 
> But, when I pass this data type as argument to a function,
do some manipulations on it, and want the function to return
it, it slows down my program due to call by value.
> 
> Is there a way to work with pointers and adresses like is
possible in C? Or is there perhaps another solution for my
problem?
> 
> All hints are really appreciated!
> 
> Many thanks,
> J.

"Inplace" package in FEX might be what you are looking for:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=11290&objectType=file

Warning: reference argument passing is not supported by
Mathworks, and they do anything to discourage users to use them.

Bruno