Reputation: 47
I've a Matrix A (319 rows*26 cols) and two vectors that represent an upper_bound (319,1) , and a lower_bound (319,1)?
My goal is to check if among a set of 26 curves (319 point for each curve) there are some point greater or lower than upper_bound / lower bound curve in order to exclude a particular set of data if there is at least one point that pass these limits.
I've tried with find() function to get the index value but without success. I've got too many data..Maybe I'm wrong managing data matrix..
Thanks in advance.
L.
Upvotes: 1
Views: 609
Reputation: 114866
One way to create a logical matrix with true
for values inside bounds is using bsxfun
>> inBounds = bsxfun( @ge, A, lowerBound ) & bsxfun( @le, A, upperBound );
I used ge
(greater-equal) and le
(less than-equal) but you can use gt
(greater than) and/or lt
(less than) operators for the comparison.
Upvotes: 2