Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: sums and loops
Date: Fri, 4 Jan 2008 15:09:34 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 26
Message-ID: <flli7e$5tt$1@fred.mathworks.com>
References: <flkv6k$fa$1@fred.mathworks.com> <fll0jh$7rt$1@fred.mathworks.com> <flldtq$1bh$1@fred.mathworks.com> <fllenj$9i8$1@fred.mathworks.com> <fllfs1$2na$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1199459374 6077 172.30.248.38 (4 Jan 2008 15:09:34 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 4 Jan 2008 15:09:34 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 113206
Xref: news.mathworks.com comp.soft-sys.matlab:444349



I think the reason is the Number of elements in vector p is not 
divided by 3 (or 5).

In this case, you could patch your array with zero numbers, 
then use reshape function.

Anh Huy Phan
RIKEN - BSI



"Dave " <bocconiluck@yahoo.com> wrote in message 
<fllfs1$2na$1@fred.mathworks.com>...
> I have millions of observations in P, i tried reshape but it
> didnt work, the example i provided was just to illustrate
> the question on small vectors. 
> 
> Reshape is producing an error . i am looking for non
> overlapping subsums over fixed interval as in the example i
> provided.
> 
> Thanks a lot for your reponse
> 
> 
>