Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Zeros some value in array
Date: Tue, 25 Aug 2009 19:42:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <h71eqr$6rf$1@fred.mathworks.com>
References: <h70nah$rkk$1@fred.mathworks.com> <h70or6$ak0$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 1251229339 7023 172.30.248.38 (25 Aug 2009 19:42:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 25 Aug 2009 19:42:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1920846
Xref: news.mathworks.com comp.soft-sys.matlab:565933


"Andy " <theorigamist@gmail.com> wrote in message <h70or6$ak0$1@fred.mathworks.com>...
> "Jaroslav " <jaroslav.hrebicek@seznam.cz> wrote in message <h70nah$rkk$1@fred.mathworks.com>...
> > Hi, 
> > 
> > how could I zeros some numbers in array? I need replace for example first three numbers by zeros, then keep original 2 numbers and then again replace next three numbers by zero etc.
> > For example, I have array of 10 numbers A=[1:10]
> > and result would be look like 0 0 0 4 5 0 0 0 9 10
> > 
> > Thanks
> 
> A=1:10;
> idx=[1:3 6:8]; % indexes to make zero
> A(idx)=0;

Thanks Andy,

but in fact, I will have about 95000 samples. So this way is not what I looking for..

But thank you..