Take the array which is less than 3

1 次查看(过去 30 天)
I have this marix
A= [ 1 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 1 3 3 3]
How can I take only value less than 3? The result should be :
A=[1 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 1]
I use this code , but its wrong
B=A(1:find(A==3)(1))

采纳的回答

madhan ravi
madhan ravi 2019-1-4

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by