From help-octave-request at che dot utexas dot edu Mon Aug 29 16:24:58 1994 Subject: Re: Various questions From: John Eaton To: wtc at courage dot arlut dot utexas dot edu (Wichaya Changwatchai) cc: help-octave at che dot utexas dot edu (Octave help mailing list) Date: Mon, 29 Aug 94 16:24:53 EDT wtc at courage dot arlut dot utexas dot edu (Wichaya Changwatchai) wrote: : 1) The section on range constants says that: : : Octave does not convert range constants to vectors unless it is : necessary to do so. : : When would it NOT be necessary to convert a range constant to a : vector? Would an example be, say, a for loop? Yes. Also, assignment of a range to a variable does not cause a conversion. Currently, indexing a range will cause the original range to be converted to a vector, and the result will be a vector, not a range. This is because it was easier to implement -- the code for indexing matrices already had to be written, and I have not had time to implement a new set of functions for indexing ranges as a special case. This might be a good project for a volunteer. :-) : 2) Is there a way to subscript a constant range, e.g. : : [2:2:10](2:4) : : as opposed to having to assign it to a dummy variable: : : a = [2:2:10]; : a(2:4) Not yet. This might be a useful extension, but it is not likely to make it to the top of my to-do list any time soon. : 3) The operators .+ and .- don't seem to work, as documented in the : manual (of course, they ARE redundant with + and -). Have they : been disabled? Oops. This will be fixed in the next release. jwe