Azzera filtri
Azzera filtri

Selecting records from a matrix subject to a condition

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by