Selecting records from a matrix subject to a condition

2 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by