Effacer les filtres
Effacer les filtres

Selecting records from a matrix subject to a condition

1 vue (au cours des 30 derniers jours)
Maroulator
Maroulator le 19 Mar 2017
My matrix(M) looks like the data below; how can I pull the records that have a third column greater than or equal to 20?
1 0.4 12
2 1.3 20
3 1.2 15
4 2.1 21

Réponse acceptée

Walter Roberson
Walter Roberson le 19 Mar 2017
M(M(:,3)>=20, :)

Plus de réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays 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!

Translated by