Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!tribune.usask.ca!support1.mathforum.org!not-for-mail
From: Jeroen <jverhoeve@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: call by reference
Date: Sat, 12 Apr 2008 05:33:27 EDT
Organization: The Math Forum
Lines: 16
Message-ID: <8902033.1207992837734.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1207992837 25475 144.118.30.135 (12 Apr 2008 09:33:57 GMT)
X-Complaints-To: news@support1.mathforum.org
NNTP-Posting-Date: Sat, 12 Apr 2008 09:33:57 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:462550



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.