[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extracting matrix rows that meet a condition
From: |
Ismael Diego Nunez-Riboni |
Subject: |
Re: Extracting matrix rows that meet a condition |
Date: |
Thu, 24 May 2012 15:09:10 +0200 |
> > Which is the error message? That the number of rows is less than the
> original one is normal, you have here less rows because of the selection x>0 &
> x<1...
>
> It does not produce any errors, the actual problem is that my original
> matrix is 1008 rows long, from using the first function to determine the
> values that lie in (x<0 | x>1) area, I know I should get 582 rows of
> values that meet the condition (x>0 & x<1). I need to write those to a new
> file.
> With the method above the matrix produced is more then twice the size of
> my original matrix, there for I am assuming I made a mistake somewhere.
>
> Knof
>
I guess the reason is this: In many of your 3-element rows there are more than
one value meeting your condition. Example:
...
0.1 0.2 6
0.1 7 8
...
In the first row you get two values meeting your condition and the function
"find" gives two entries with the same index i...
Try this after using find to eliminate the repeated i-entries:
i = unique(i);
--
Ismael Núñez-Riboni
Hamburg
Deutschland
--------
¿Quién dijo que todo está perdido?
Yo vengo a ofrecer mi corazón...
Fito Páez
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
- Extracting matrix rows that meet a condition, Knof, 2012/05/23
- Re: Extracting matrix rows that meet a condition, Ismael Núñez-Riboni, 2012/05/23
- Message not available
- Message not available
- Message not available
- Re: Extracting matrix rows that meet a condition,
Ismael Diego Nunez-Riboni <=
- Message not available
- Re: Extracting matrix rows that meet a condition, Ismael Diego Nunez-Riboni, 2012/05/24
- Re: Extracting matrix rows that meet a condition, Knof, 2012/05/24
- Re: Extracting matrix rows that meet a condition, Ismael Diego Nunez-Riboni, 2012/05/24
- Re: Extracting matrix rows that meet a condition, Knof, 2012/05/24
- Re: Extracting matrix rows that meet a condition, Ismael Núñez-Riboni, 2012/05/24
Re: Extracting matrix rows that meet a condition, Juan Pablo Carbajal, 2012/05/23