Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: I'm dense, but...somebody 'splain accumarray() please?
Replies: 23   Last Post: Jul 11, 2013 1:00 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,167
Registered: 6/7/07
Re: I'm dense, but...somebody 'splain accumarray() please?
Posted: Jul 11, 2013 1:00 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 7/11/2013 10:03 AM, Kelly Kearney wrote:
> dpb <none@non.net> wrote in message <krkn62$b02$1@speranza.aioe.org>...
>

>> Does it eliminate the intermediary storage or only move it to a level
>> below the calling function so it does (at least which is
>> _a_good_thing_ (tm) ) vanish silently?

>
> Yeah, it justs moves the index step into function, so you don't need to
> worry about it. Regarding getting certain outputs only, perhaps a
> wrapper function like:
>
> %---
> function varargout = outnum(fun, idx, varargin)
> % fun: handle to function
> % idx: output #s you want to keep
> % varargin: input variables to the function
> varargout = cell(1, max(idx));
> [varargout{:}] = fun(varargin{:});
> varargout = varargout(idx);
> %---
>
> (I haven't tested that thoroughly, but I think it should work).

...

OK, I grok that is one way to reduce the top-level explicit deallocation
(and probably the only way w/ current syntax) w/ the perhaps obfuscation
of some code intent. "There is no free lunch." :)
>
>> > And regarding the other topic of this thread, I also hate the new
>> > documentation. But I've been lamenting changes on that front ever since
>> > they eliminated the Index... it's simply gotten worse and worse since
>> > then. The crash-Matlab-completely-for-no-apparent-reason feature of the
>> > R2013a Help Browser is a particularly nice touch, though. Ugh.

>>
>> That's disheartening to hear it hasn't yet gone away--I found it in
>> R2012b.

>
> Ah, well, I skipped straight from 2012a to 2013a, so I'm just
> discovering it. Unfortunately, I have to upgrade for my site license, or
> I think I would gladly revert to R2008b, the last version that I felt
> truly offered me an upgrade.

...

I returned to farm in 2000 and only had a couple years' contracting work
in place, none of which was at all Matlab-intensive, so I hadn't updated
since R12. Consequently is why am just now beginning to learn
accumarray, cellfun, bsxfun and friends since I only got on 2012b about
a year ago and haven't had much time until the heat of this summer and
the severe drought has pretty well shut down farm field work so I've
been piddling a lot more w/ stuff wasn't that familiar with than had been...

--



Date Subject Author
7/5/13
Read I'm dense, but...somebody 'splain accumarray() please?
dpb
7/5/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/6/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
james bejon
7/8/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Steven Lord
7/8/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/9/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Steven Lord
7/9/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Marc
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Kim Andrews
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
EBS
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
EBS
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Kelly Kearney
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/11/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Kelly Kearney
7/11/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Kelly Kearney
7/10/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
dpb
7/11/13
Read Re: I'm dense, but...somebody 'splain accumarray() please?
Steven Lord

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.