[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Example of varargout?
From: |
Etienne Grossmann |
Subject: |
Re: Example of varargout? |
Date: |
Sun, 3 Nov 2002 12:04:52 +0000 |
User-agent: |
Mutt/1.3.28i |
Ok, this works; [] are needed around varargout. [...] works but
causes a warning.
function [varargout] = foo ()
for i = 1:nargout, varargout{i} = i ; end;
end
Thanks for the tip,
Etienne
On Sat, Nov 02, 2002 at 04:31:36PM -0500, Paul Kienzle wrote:
# Assuming you start with argout = 1, you can replace vrval(x)
# with varargout{argout++} = x.
#
# Alternatively, if you have a number of vrval's you can use
# varargout = { x, y, z }
#
# Paul Kienzle
# address@hidden
#
# On Sat, Nov 02, 2002 at 08:10:34PM +0000, Etienne Grossmann wrote:
# >
# > Hello,
# >
# > just to ask : how does one use varargout?
# >
# > Etienne
# >
# > --
# > Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne
# >
#
#
--
Etienne Grossmann ------ http://www.isr.ist.utl.pt/~etienne
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------