From octave-maintainers-request at bevo dot che dot wisc dot edu Tue Dec 31 15:25:42 2002 Subject: Re: f(end) feature? From: Paul Kienzle To: "John W. Eaton" Cc: octave-maintainers at bevo dot che dot wisc dot edu Date: Tue, 31 Dec 2002 16:25:30 -0500 So I guess the following is out of the question: function y = head(x) y = x(1:min(3,end)); end - Paul On Tue, Dec 31, 2002 at 02:16:14PM -0600, John W. Eaton wrote: > On 31-Dec-2002, Paul Kienzle wrote: > > | octave:1> function y=f(x), y=x; end > | octave:2> f(end) > | ans = 1 > > Try the following patch. With it, you should see > > octave:1> function y = f (x) y = x; end > octave:2> f (end) > error: invalid use of end > error: evaluating argument list element number 1 > > jwe