Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Summing content of one matrix based on another
Date: Fri, 8 Jul 2011 07:18:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <iv6avh$9f2$1@newscl01ah.mathworks.com>
References: <iv4c7e$gv5$1@newscl01ah.mathworks.com> <iv64bm$m9o$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1310109489 9698 172.30.248.47 (8 Jul 2011 07:18:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 8 Jul 2011 07:18:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:735485

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <iv64bm$m9o$1@newscl01ah.mathworks.com>...
> >> accumarray(B(:),A(:))
> ans =
>    228
>    256
>    238
>    240
>    223
>    229
- - - - - - - - - -
  It appears I didn't read the problem carefully enough.  It was that first sum (51+68+57+52) that correctly equaled 228 with my interpretation that threw me off.  Your interpretation is undoubtedly the correct one, Bruno.

Roger Stafford