On 14 February 2012 15:55, Jordi Gutiérrez Hermoso <jord...@octave.org> wrote: > On 14 February 2012 10:35, Dr. Alexander Klein > <alexander.kl...@math.uni-giessen.de> wrote: >> >> accumulating results of repeated function evaluations (inject_into), >> > >> > accumarray? > >> Will this do something like > >> inject_into (@(x, y){x{:},rand(y)},num2cell(1:10),{}) > > No, I suppose I misunderstood what you meant with "accumulate". But I > don't find this function call more convenient than > > cellfun(@(x) rand(x), num2cell(1:10), "unif", 0); > > It seems like extra syntax for no additional benefit. > >> Really, all those functions are meant for the most part to provide >> ways to get away without loops, maybe to avoid indexing errors along >> the way, even when objects are complex, and predicates ignorant >> about of (cell) arrays. Nothing more, and nothing less. > > But Octave already has ways to do this: > > > http://www.gnu.org/software/octave/doc/interpreter/Vectorization-and-Faster-Code-Execution.html > >> I really liked the ease of use with collections in Smalltalk, but >> then again I'm too nostalgic, maybe? > > This seems to be a bit too much like a square peg for a round hole. > Octave is, somewhat intentionally, a very limited language. If you're > trying to use Smalltalk message-passing in Octave, you will run into > many frustrations. I still think that using reject and select instead > of logical indexing is strange for Octave.
Maybe a note can be added to the help text of this functions later explaining that this functions allow for ease of read/write for users that are familiar with smalltalk but that logical indexing is a more octavish approach that may have better performace? Carnë ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev