How to filter the following vector from multiple vectors?
Show older comments
How to filter the following vector from multiple vectors?
I want to do the following for each matrix stored in M
suppose each vector is named as the following in Matrix M: [deltaX
deltaY
1]
I want to filter the vector that satisfy the following conditions:
if abs(deltaY) is less than threshold for example 32
then select that vectors/vector
after that if there are more than selected vectors, filter them as the following:
select the vector that has the min deltaX
*The out should be 23 separated vectors each corrosponding to its matrix
1 Comment
What does this mean: "suppose the each vector is named as the following in Matrix MM"?
Would it be impolite if I reply although I'm neither Matt J nor Star Strider?! Please avoid addressing specific persons in the forum except if you have really good reasons.
Accepted Answer
More Answers (1)
Jan
on 19 May 2022
Maybe:
V = MM(:, abs(MM(2, :)) < 32);
[~, index] = min(V(1, :));
W = V(:, index)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!