Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!newsfeed.stanford.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!tribune.usask.ca!support1.mathforum.org!not-for-mail
From: bogfrog <jmcgraw@rcn.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: count number of
Date: Wed, 30 Jul 2008 00:52:57 EDT
Organization: The Math Forum
Lines: 5
Message-ID: <21760272.1217393607530.JavaMail.jakarta@nitrogen.mathforum.org>
References: <g6oq99$dh6$1@fred.mathworks.com>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1217393607 21435 144.118.30.135 (30 Jul 2008 04:53:27 GMT)
X-Complaints-To: news@support1.mathforum.org
NNTP-Posting-Date: Wed, 30 Jul 2008 04:53:27 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:482533



> d=17465765
> [crap,e]=log2(max(d));
> n=sum(rem(floor(d*pow2(1-max(1,e):0)),2));

How in the world you can come up with that, I'll never know.  But thanks! :)