Reputation: 1
I am trying to find the min value for values equal to or above 3. this doesn't work
A = [21,1, 2, 3, 4, 5, 6, 7, -1, 8, 9, 10]; idx=find(3<A & A==min(A)); A(idx)
Upvotes: 0
Views: 643
Reputation: 1077
You can use logical indexing in Matlab.
min( A( A >= 3 ) )
Upvotes: 4