From bug-request at octave dot org Tue Apr 11 13:15:34 2006 Subject: Re: unexpected help From: "John W. Eaton" To: tomh at kurage dot nimh dot nih dot gov Cc: bug at octave dot org Date: Tue, 11 Apr 2006 14:15:25 -0400 On 11-Apr-2006, Tom Holroyd (NIH/NIMH) [E] wrote: | Ah! I will now go read the documentation to find the real way to | shorten a cell array. x = {1,2,3,4}; x = x(2:3); | The assignment should be allowed, I think; If you write x = {1, 2}; foo (x{:}) it is as if you had written foo (x{1}, x{2}) so for consistency, I think y = x{:} should be equivalent to y = x{1}, x{2} This is valid syntax, but would probably result in very confusing behavior. It is an accident of Octave's implementation of comma-separated lists that they can be assigned to a single variable. jwe ------------------------------------------------------------- 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 -------------------------------------------------------------