Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Create a new vector from a current vector
Date: Tue, 6 Nov 2007 11:57:11 +0000 (UTC)
Organization: fz
Lines: 38
Message-ID: <fgpkqn$rgf$1@fred.mathworks.com>
References: <fgnbec$21u$1@fred.mathworks.com> <fgnes3$mop$1@fred.mathworks.com> <fgng65$d9h$1@fred.mathworks.com> <fgnjd5$ss1$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 1194350231 28175 172.30.248.37 (6 Nov 2007 11:57:11 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 6 Nov 2007 11:57:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1088664
Xref: news.mathworks.com comp.soft-sys.matlab:436244



"us " <us@neurol.unizh.ch> wrote in message
<fgnjd5$ss1$1@fred.mathworks.com>...
> nor ki:
> <SNIP found a mistake in <us>'s reply - did he/she?
> 
> > sorry i don“t get the same results...
> 
> what results? i did not show them...
> 
> % here they are
>      [abeg;aend]
> %     1     6     7    10    18
> %     5     6     9    17    20
> 
>      r
> %    13     4    13    27     9
> 
> % now, compare a few results, eg
>      sum(a(1:5)) % = 13
>      sum(a(10:17)) % = 27
> % which seem ok...
> 
> note: i said <more versatile>
> us

sorry for my stupid remark 
i just like to understand your solution

the original desired result was
B=[11,14,14,17,10];

then 
     abeg = 1:4:numel(a)
     aend = 4:4:numel(a)
would do it?

nor ki