Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Is there a parallel version of matrix multiplication in MATLAB?
Date: Wed, 4 Nov 2009 23:10:19 +0000 (UTC)
Organization: Boeing
Lines: 24
Message-ID: <hct1kq$kd$1@fred.mathworks.com>
References: <hcqehk$17u$1@fred.mathworks.com> <hcs5it$2gu$1@fred.mathworks.com> <hcs88f$psp$1@fred.mathworks.com> <hcs8t2$7r8$1@fred.mathworks.com> <hcs9ef$c0u$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257376219 653 172.30.248.35 (4 Nov 2009 23:10:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 23:10:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:582557


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hcs9ef$c0u$1@fred.mathworks.com>...
> Arrg, there is still another bug...
> 
> % binary decomposition
> nb = dec2bin(n)-'0';
> ak = a;
> if nb(end)
>     d = a;
> else
>     d = 1;
> end
> for k=length(nb)-1:-1:1
>     ak = ak*ak;
>     if nb(k)
>         d = d*ak;
>     end
> end
> 
> 
> Bruno

Hey Bruno ... out of curiosity, do you happen to know if the polyvalm function uses this type of scheme (or similar) to minimize total computations? I could code something up and make some timing tests, but wondered if you already knew the answer.

James Tursa