How to filter a certain range of values
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, i would like to ask how to filt both row had value in range of 100 to 1500
Thanks a lot
0 commentaires
Réponses (1)
Star Strider
le 27 Sep 2023
I am not certain what you mean by ‘filt’ since I do not know if you want to keep those values or exclude them.
M1 = readmatrix('myfile.csv')
Lv1 = M1>=100 & M1 <=150; % Logical Vector
Columns_Meeting_Criteria = M1(:,(Lv1(1,:) | Lv1(2,:)))
Columns_Not_Meeting_Criteria = M1(:,~(Lv1(1,:) | Lv1(2,:)))
Lv2 = Lv1(1,:) & Lv1(2,:);
NumIdx = find(Lv2)
No columns meet both criteria.
.
0 commentaires
Voir également
Catégories
En savoir plus sur Create Block Masks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!