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. A further problem is that cellfun suffers a performance penalty when using anonymous functions, and this is somewhat inevitable due to the design of how function in Octave work. But perhaps there are benefits here I don't see. If Carnë thinks these functions should go into general or miscellaneous, I suppose there is no harm in doing so. - Jordi G. H. ------------------------------------------------------------------------------ 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