From bug-request at octave dot org Tue Apr 11 13:00:10 2006 Subject: 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 13:59:48 -0400 On 11-Apr-2006, Tom Holroyd (NIH/NIMH) [E] wrote: | ... reading in a large dataset ... with 2.9.5+ dated april 2 ... | | octave:19> length(data.trial) | ans = 478 | octave:20> length(data.trial)/2 | ans = 239 | octave:21> data.trial = data.trial{1:length(data.trial)/2}; This is the real source of the error. At this point, data.trial is a "comma-separated list". We should probably not allow this assignment to happen, so you should have seen an error here. But the assignment did work, so the next statement | octave:22> length(data.trial) is actually passing 1:length(data.trial)/2 separate arguments to length. That's a usage error, so you get the help. To clarify that this is a usage error, I'll see if I can arrange for print_usage to begin with something like error: invalid usage of length: instead of just *** length: 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 -------------------------------------------------------------