Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Vectorization of matrix operations--need guru's help!
Date: Mon, 24 Nov 2008 20:19:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <ggf27m$5gd$1@fred.mathworks.com>
References: <ggeq17$hj$1@fred.mathworks.com> <ggeu2i$1l4$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227557942 5645 172.30.248.37 (24 Nov 2008 20:19:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 24 Nov 2008 20:19:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:502924


"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <ggeu2i$1l4$1@fred.mathworks.com>...
> ......
>   I leave it to you to implement these notions.
> ......

  Despite my intention to leave the implementation to you, curiosity got the better of me and I decided to see what the resulting code would look like.  Here it is.  See if you agree with it.

 m4 = (sum(sum(mwk,1))^2-sum(sum(mwk,1).^2)-sum(sum(mwk,2).^2) ...
      +sum(sum(mwk.^2,1)))/(n0*n1*(n0-1)*(n1-1));

Roger Stafford