MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > Filtering values in a matrix 

Hello, 
Yes, there is a neat way to do that in matlab without loops. 
Thank you! But this just filters out the values i want that the values that do not fall in the rang should be replaced by zeroes so that the size of the matrix does not change. 
"Snow White" <gulesaman@gmail.com> wrote in message <i4b3rl$mkc$1@fred.mathworks.com>... 
> "Roland " <burgmann@gmx.de> wrote in message <i48u9v$q66$1@fred.mathworks.com>... 
Partially yes but what i want is that if for a certain dimension there are more than one values falling in the range that value should be replaced in the result and saved/displayed accordingly. As i have pointed out in the out put that i want. All the columns are similar except column 2 where there are more results that fall within the range. 
Subject: Filtering values in a matrix From: Steven_Lord Date: 16 Aug, 2010 14:04:02 Message: 7 of 14 

my original matrix is has different values and i want to filter out some values and replace the rest by 0. As i said that all the values are the same expect the second column where there is overlapping so in my result i want that results are displayed separately with the new values replaced. 
Subject: Filtering values in a matrix From: Walter Roberson Date: 16 Aug, 2010 14:38:58 Message: 9 of 14 
Snow White wrote: 
Subject: Filtering values in a matrix From: Snow White Date: 16 Aug, 2010 15:15:14 Message: 10 of 14 
My output matrix also has 9 columns i think your missing our the 0s column 
Subject: Filtering values in a matrix From: Steven_Lord Date: 16 Aug, 2010 17:30:59 Message: 11 of 14 

Subject: Filtering values in a matrix From: Snow White Date: 16 Aug, 2010 18:32:04 Message: 12 of 14 
ok step 1: 
Subject: Filtering values in a matrix From: Steven_Lord Date: 16 Aug, 2010 20:35:49 Message: 13 of 14 

Subject: Filtering values in a matrix From: Snow White Date: 16 Aug, 2010 20:53:05 Message: 14 of 14 
ok step 1: 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.