Borrar filtros
Borrar filtros

Selecting records from a matrix subject to a condition

1 visualización (últimos 30 días)
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Mzo. de 2017
M(M(:,3)>=20, :)

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by