I am trying to get the code below to output the number of elements within v(a vector) that are below 2 and above 4.
When I define v and run this, it does not work as I would like it to. eg for
sum(sum(v<2 & v>4))
I am expecting an output of 2, since there is 1 element below 2(1), and 1 element above 4(5).