From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Speed up the nested loops (slower than inverse a large matrix)
Date: Sat, 27 Nov 2010 18:51:03 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 8
Message-ID: <icrjun$oe5$>
References: <icpphd$cb2$> <icpt5k$2q$> <icq1vb$t6d$> <icqhka$6og$> <icretg$4gm$>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1290883863 25029 (27 Nov 2010 18:51:03 GMT)
NNTP-Posting-Date: Sat, 27 Nov 2010 18:51:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:690481

"Ximing xu" <> wrote in message <icretg$4gm$>...

> I also tried Bruno's idea  to extract  all the 2x2 submatrices of R (also the F) and put it on 3D array; but it turn out the procedure to do the extraction  is just as slow as doing the sum directly.

I guess timing depends *how* you do the extraction. A for-loop would not be optimal.