Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: getting a list
Date: Sun, 30 Nov 2008 23:52:02 +0000 (UTC)
Organization: PhysioSonics Inc
Lines: 9
Message-ID: <ggv8v2$291$1@fred.mathworks.com>
References: <ggupr9$280$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1228089122 2337 172.30.248.38 (30 Nov 2008 23:52:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 30 Nov 2008 23:52:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1129061
Xref: news.mathworks.com comp.soft-sys.matlab:503977


"Isabel" <isabels29@hotmail.com> wrote in message <ggupr9$280$1@fred.mathworks.com>...
> What I've been doing is this:
> function z=add(T)
> z(1)=2*T
> z(2)=3*T
> end
> but I would like to know how to put a list as an output argument. Thanks!

Your function seems to work fine for me.  I get z = [10 15] as the return argument.  Maybe you have a conflict with the built-in add function.  Run 'which add -all' and check if your function is being shadowed ... or just rename it.