I have a vector containing tuples and I want to extract some tuples that meet certain conditions. I tried something as shown below but didn’t get the expected result.
A = [(1,2),(3,2),(3,4),(5,4),(3,2)]
A_c = findall(x->x[2] <= 2, A)
# I get A_c = [1,2,5], but I need A_c = [(1,2),(3,2),(3,2)]
Your help will be highly appreciated.