Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Data analysis
Date: Tue, 21 Jul 2009 10:01:04 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 31
Message-ID: <h443l0$8rg$1@fred.mathworks.com>
References: <h44342$4iu$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248170464 9072 172.30.248.35 (21 Jul 2009 10:01:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Jul 2009 10:01:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:557056


"Jesper Lauridsen" <jesperholst_5@hotmail.com> wrote in message <h44342$4iu$1@fred.mathworks.com>...
> I have the following data in a vector called DATA1:
> 
> 0.015
> 0.01
> 0.01
> 0.01
> 0.01
> 0.005
> 0.005
> 0.005
> 0.005
> 0.005
> 0.005
> 0.005
> 0.005
> 0.005
> 
> What I want is to replace all values that are less or equal to 0.005 with zero in the vector. I was thinking to use some kind of if statement.
> 
> if DATA_1<=0.005
> ...........
> else
> ...........
> end

one of the solutions

     data1(data1<=.005)=0;

us