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: Re: call by reference
Date: Mon, 14 Apr 2008 14:07:33 EDT
Organization: The Math Forum
Lines: 13
Message-ID: <21939771.1208196484549.JavaMail.jakarta@nitrogen.mathforum.org>
References: <muyk5j0czvp.fsf@G99-Boettcher.llan.ll.mit.edu>
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 1208196484 24556 144.118.30.135 (14 Apr 2008 18:08:04 GMT)
X-Complaints-To: news@support1.mathforum.org
NNTP-Posting-Date: Mon, 14 Apr 2008 18:08:04 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:462903



Hi,
indeed, it is aldready done by reference

What I am doing is: 
function list = actionOnList(list)

Since the input argument is the same as the output argument, matlab handles it by reference. This is what I figured out on the internet.

I am loosing time in another place in the code, which uses extensively if/else statements. This is in an iterative loop, so I set the constraints to quit the loop less strict.

This solved my performance problem.

Thanks.