X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.65.235
Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!proxad.net!feeder1-2.proxad.net!nntpfeed.proxad.net!news.side3.eu!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!feed4.jnfs.ja.net!feed2.jnfs.ja.net!jnfs.ja.net!gemini.csx.cam.ac.uk!news.cam.ac.uk!tpl
From: tpl@eng.cam.ac.uk (Tim Love)
Newsgroups: comp.soft-sys.matlab
Subject: Re: sums and loops
Date: 4 Jan 2008 14:02:13 GMT
Organization: University of Cambridge, England
Lines: 17
Message-ID: <flle95$sb4$1@gemini.csx.cam.ac.uk>
References: <flkv6k$fa$1@fred.mathworks.com> <fll0jh$7rt$1@fred.mathworks.com> <flldtq$1bh$1@fred.mathworks.com>
NNTP-Posting-Host: last.eng.cam.ac.uk
Xref: news.mathworks.com comp.soft-sys.matlab:444325



"Dave " <bocconiluck@yahoo.com> writes:


>thanks for the reply, i explain the question further 

>p=[1 2 3 4 5 6 7 8 9]'

>we need a code that sums elements in p for ex the first
>three elements at a time resulting in a new column s

>s=[6 15 24]'

>(6=1+2+3 .. 15=4+5+6 ... 24= 7+8+9 ...)

>I tried reshape in didnt work but thanks for the input

It might help if you showed us exactly what you tried.