Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: An even nastier vector operation!
Date: Thu, 18 Mar 2010 17:51:04 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 4
Message-ID: <hntp68$54e$1@fred.mathworks.com>
References: <hntltp$r3r$1@fred.mathworks.com> <fa49b8fe-3d84-4bb8-a304-c39dad6b49a7@i25g2000yqm.googlegroups.com> <hntobu$hln$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1268934664 5262 172.30.248.37 (18 Mar 2010 17:51:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 18 Mar 2010 17:51:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:617998

If I understand correctly:

C = cumsum(A);
C = C(B)./(B.')